Explorar o código

malloc sucks, you know?

Ali H. Fardan %!s(int64=9) %!d(string=hai) anos
pai
achega
bc38677f47
Modificáronse 1 ficheiros con 0 adicións e 6 borrados
  1. 0 6
      slstatus.c

+ 0 - 6
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) {