sad

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

commit 72de2de7ffd46b5249a68c22a0fe8486cc120c6f
parent 3a3a731a2ae835b6fce1d35b19bb15eb4a1c98dc
Author: sin <sin@2f30.org>
Date:   Mon Jan 19 20:39:08 +0000

Use 'r' for return value instead of 'ok'

Diffstat:
cmd.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/cmd.c b/cmd.c @@ -16,7 +16,7 @@ static void cmdstatus(int fd, char *arg) { Song *s; - int ok = 0; + int r = 0; if (!arg[0]) { dprintf(fd, "ERR expected argument\n"); @@ -24,16 +24,16 @@ cmdstatus(int fd, char *arg) } if (!strncmp(arg, "random", 7)) { - ok = 1; + r = 1; dprintf(fd, "random: %d\n", getplaylistmode() & RANDOM == 1); } else if (!strncmp(arg, "repeat", 7)) { - ok = 1; + r = 1; dprintf(fd, "repeat: %d\n", getplaylistmode() & REPEAT == 1); } else if (!strncmp(arg, "single", 7)) { - ok = 1; + r = 1; dprintf(fd, "single: %d\n", getplaylistmode() & SINGLE == 1); } else if (!strncmp(arg, "songid", 7)) { - ok = 1; + r = 1; s = getcursong(); if (!s) { @@ -43,7 +43,7 @@ cmdstatus(int fd, char *arg) dprintf(fd, "songid: %d\n", s->id); } else if (!strncmp(arg, "playback", 9)) { - ok = 1; + r = 1; s = getcursong(); dprintf(fd, "playback: "); @@ -64,7 +64,7 @@ cmdstatus(int fd, char *arg) dprintf(fd, "stop\n"); } - if (ok) { + if (r) { dprintf(fd, "OK\n"); return; }