spoon

set dwm status
git clone git://git.2f30.org/spoon
Log | Files | Refs | LICENSE

commit 5ba652ae8140d3e40fd6a8a1a24a942c25748506
parent 8b6be1c39cc5ddce03b020f6cfd8a63776dd2e41
Author: lostd <lostd@2f30.org>
Date:   Mon, 19 Sep 2016 22:58:56 +0200

Make code more uniform

Diffstat:
Mspoon.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spoon.c b/spoon.c @@ -136,13 +136,13 @@ mixread(char *buf, size_t len) warn("open %s", "/dev/mixer"); return -1; } + dinfo.index = 0; /* outputs */ - for (dinfo.index = 0; ; dinfo.index++) { + for (; ; dinfo.index++) { ret = ioctl(fd, AUDIO_MIXER_DEVINFO, &dinfo); if (ret == -1) { warn("AUDIO_MIXER_DEVINFO %s", "/dev/mixer"); - close(fd); - return -1; + goto out; } if (dinfo.type == AUDIO_MIXER_CLASS && strcmp(dinfo.label.name, AudioCoutputs) == 0) {