slstatus

status monitor
git clone git://git.suckless.org/slstatus
Log | Files | Refs | README | LICENSE

commit 60b28d8a78b14ecc43f1c7d177cfa5f8597e2071
parent 7a8545952ef647e6862c5b184aee0b13a48e741d
Author: drkhsh <me@drkhsh.at>
Date:   Tue, 23 Jun 2026 19:27:55 +0200

fix use of uninitialized volume in OSS mixer

if no "vol" device exists in the mixer, v was used uninitialized.
return early on match and return NULL with a warning otherwise.

Diffstat:
Mcomponents/volume.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/components/volume.c b/components/volume.c @@ -211,11 +211,14 @@ close(afd); return NULL; } + close(afd); + return bprintf("%d", v & 0xff); } } close(afd); + warn("vol_perc: no 'vol' mixer device"); - return bprintf("%d", v & 0xff); + return NULL; } #endif