sad

simple audio daemon
git clone git://git.2f30.org/sad
Log | Files | Refs | LICENSE

commit ce9d7494ccb1fc0d8fc403a4d135e6f70e22cad8
parent 1d365bfd9e2db0d1a1fb3013b04a9f613819daf6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 27 Dec 2014 13:35:00 +0100

playlist realloc: we error on reallocarray so remove temp var

Diffstat:
Mplaylist.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/playlist.c b/playlist.c @@ -18,7 +18,6 @@ addplaylist(const char *path) { Decoder *d; Song *s; - Song **p; d = matchdecoder(path); if (!d) @@ -26,9 +25,8 @@ addplaylist(const char *path) if (!playlist.nsongs || playlist.nsongs + 1 > playlist.maxsongs) { playlist.maxsongs += 4096; - if (!(p = reallocarray(playlist.songs, playlist.maxsongs, sizeof(Song *)))) + if (!(playlist.songs = reallocarray(playlist.songs, playlist.maxsongs, sizeof(Song *)))) err(1, "reallocarray"); - playlist.songs = p; } if (!(s = calloc(1, sizeof(Song)))) err(1, "calloc");