From bc38677f4734e9239d6f2dc3df8e4c56c330167a Mon Sep 17 00:00:00 2001 From: "Ali H. Fardan" Date: Wed, 14 Sep 2016 03:35:53 +0300 Subject: malloc sucks, you know? --- slstatus.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'slstatus.c') diff --git a/slstatus.c b/slstatus.c index f0d9544..ea8fc20 100644 --- 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) { -- cgit v1.2.3