sad

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

commit a4b212b0cd2cac5a352706b09821808c042e3516
parent 093d0682d14384b3ab8cb114d211c42dd4a03445
Author: sin <sin@2f30.org>
Date:   Fri,  2 Jan 2015 15:59:35 +0000

Style fix

Diffstat:
Mcmd.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cmd.c b/cmd.c @@ -256,10 +256,7 @@ cmdremove(int fd, char *arg) const char *errstr; int id; - if (!arg[0]) { - s = getcursong(); - stopsong(s); - } else { + if (arg[0]) { id = strtonum(arg, 0, INT_MAX, &errstr); if (errstr) { dprintf(fd, "ERR invalid song id\n"); @@ -270,7 +267,11 @@ cmdremove(int fd, char *arg) dprintf(fd, "ERR cannot find song with given id\n"); return; } + } else { + s = getcursong(); + stopsong(s); } + if (rmplaylist(s->id) < 0) { dprintf(fd, "ERR failed to remove song\n"); return;