diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2013-08-04 18:53:43 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2013-08-07 17:37:33 +0200 |
commit | ee2e73cd7b5a1de68c8316e916c4ef3a88302bed (patch) | |
tree | e952d75d075598123d5ecbe92f14838ce75f6db5 /src/main.c | |
parent | 36ea2f13f87b9310219790c3cee498201d54f8e0 (diff) | |
download | pianobar-ee2e73cd7b5a1de68c8316e916c4ef3a88302bed.tar.gz pianobar-ee2e73cd7b5a1de68c8316e916c4ef3a88302bed.tar.bz2 pianobar-ee2e73cd7b5a1de68c8316e916c4ef3a88302bed.zip |
piano: Generic linked lists
Introduces generic linked list structure and functions (like append,
delete, …). Removes a lot of copy&pasted code and improves code
readability/reusability.
Heads up: This change breaks libpiano’s ABI.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* -Copyright (c) 2008-2012 +Copyright (c) 2008-2013 Lars-Dominik Braun <lars@6xq.net> Permission is hereby granted, free of charge, to any person obtaining a copy @@ -372,8 +372,8 @@ static void BarMainLoop (BarApp_t *app) { /* what's next? */ if (app->playlist != NULL) { PianoSong_t *histsong = app->playlist; - app->playlist = app->playlist->next; - histsong->next = NULL; + app->playlist = PianoListNextP (app->playlist); + histsong->head.next = NULL; BarUiHistoryPrepend (app, histsong); } if (app->playlist == NULL) { |