all repos — slstatus @ cc1bb3a3445696466e9be24f4dae0d9453896eb0

my build of slstatus (tools.suckless.org/slstatus/)

removed unnecessary fp, shorter return 0 and fixed compiler warning in vol_perc
Aaron Marcher info@nulltime.net
Sun, 09 Oct 2016 14:06:04 +0200
commit

cc1bb3a3445696466e9be24f4dae0d9453896eb0

parent

5e7aa2a321c0a60c03021b0f25bec1c15a713dab

1 files changed, 3 insertions(+), 4 deletions(-)

jump to
M slstatus.cslstatus.c

@@ -269,10 +269,9 @@ static char *

hostname(void) { char buf[HOST_NAME_MAX]; - FILE *fp; if (gethostname(buf, sizeof(buf)) == -1) { - warn(1, "hostname"); + warn("hostname"); return smprintf(UNKNOWN_STR); }

@@ -498,9 +497,9 @@ snd_mixer_selem_id_free(s_elem);

snd_mixer_close(handle); if (max == 0) - return smprintf("%d%%", 0); + return smprintf("0%%"); else - return smprintf("%d%%", ((uint_fast16_t)(vol * 100) / max)); + return smprintf("%lu%%", ((uint_fast16_t)(vol * 100) / max)); } static char *