projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e7aa2a
)
removed unnecessary fp, shorter return 0 and fixed compiler warning in vol_perc
author
Aaron Marcher
<info@nulltime.net>
Sun, 9 Oct 2016 12:06:04 +0000
(14:06 +0200)
committer
Aaron Marcher
<info@nulltime.net>
Sun, 9 Oct 2016 12:06:04 +0000
(14:06 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index 641730515d9953b56a33973426ba0d448ff4d80f..e7c1c3f45aed7851ab744ec0fd431a2a0f79495c 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.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
@@
vol_perc(const char *card)
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 *