Introduction
Introduction Statistics Contact Development Disclaimer Help
tLoad and free resources, was reading stale data - spoon - dwm status utility (…
git clone git://src.adamsgaard.dk/spoon
Log
Files
Refs
LICENSE
---
commit 4981b3a67901a712d52ab9a921cf571232de88c1
parent a722598c8613433000b5d3fae11e776ff9f438c2
Author: lostd <[email protected]>
Date: Mon, 7 Nov 2016 12:33:39 +0000
Load and free resources, was reading stale data
Diffstat:
M mix.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/mix.c b/mix.c
t@@ -98,12 +98,12 @@ mixread(void *arg, char *buf, size_t len)
warnx("snd_mixer_selem_register: %s", snd_strerror(r));
goto out;
}
+readvol:
r = snd_mixer_load(mixerp);
if (r < 0) {
warnx("snd_mixer_load: %s", snd_strerror(r));
goto out;
}
-readvol:
elem = snd_mixer_find_selem(mixerp, id);
if (elem == NULL) {
warnx("could not find mixer element");
t@@ -130,6 +130,7 @@ readvol:
else
master = 100 * vol / max;
snprintf(buf, len, "%d%%", master);
+ snd_mixer_free(mixerp);
return 0;
out:
snd_mixer_close(mixerp);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.