tMake code more uniform - spoon - dwm status utility (2f30 fork)
(HTM) git clone git://src.adamsgaard.dk/spoon
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 5ba652ae8140d3e40fd6a8a1a24a942c25748506
(DIR) parent 8b6be1c39cc5ddce03b020f6cfd8a63776dd2e41
(HTM) Author: lostd <lostd@2f30.org>
Date: Mon, 19 Sep 2016 22:58:56 +0200
Make code more uniform
Diffstat:
M spoon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/spoon.c b/spoon.c
t@@ -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) {