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:
f28e268
)
malloc sucks, you know?
author
Ali H. Fardan
<raiz@firemail.cc>
Wed, 14 Sep 2016 00:35:53 +0000
(
03:35
+0300)
committer
Ali H. Fardan
<raiz@firemail.cc>
Wed, 14 Sep 2016 00:35:53 +0000
(
03:35
+0300)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index f0d95444e89eefb2be7e22609213f1816bf4fc32..ea8fc2093827a391cafbc9e0e631ce4294f88f52 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-119,12
+119,6
@@
battery_state(const char *battery)
char state[12];
FILE *fp;
- if (!state) {
- warn("Failed to get battery state.");
- return smprintf(UNKNOWN_STR);
- }
-
-
ccat(3, "/sys/class/power_supply/", battery, "/status");
fp = fopen(concat, "r");
if (fp == NULL) {