malloc sucks, you know?
This commit is contained in:
parent
f28e2682fd
commit
bc38677f47
1 changed files with 0 additions and 6 deletions
|
@ -119,12 +119,6 @@ battery_state(const char *battery)
|
||||||
char state[12];
|
char state[12];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
if (!state) {
|
|
||||||
warn("Failed to get battery state.");
|
|
||||||
return smprintf(UNKNOWN_STR);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ccat(3, "/sys/class/power_supply/", battery, "/status");
|
ccat(3, "/sys/class/power_supply/", battery, "/status");
|
||||||
fp = fopen(concat, "r");
|
fp = fopen(concat, "r");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue