fix #1017: i3status uses generic battery instance

This commit is contained in:
Jonas Cleve 2013-05-04 16:22:29 +02:00 committed by Michael Stapelberg
parent de8c6cba60
commit 6a84138251

View File

@ -55,11 +55,11 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char
memset(emptytimebuf, '\0', sizeof(emptytimebuf));
memset(consumptionbuf, '\0', sizeof(consumptionbuf));
INSTANCE(path);
#if defined(LINUX)
static char batpath[512];
sprintf(batpath, path, number);
INSTANCE(batpath);
#if defined(LINUX)
if (!slurp(batpath, buf, sizeof(buf))) {
OUTPUT_FULL_TEXT(format_down);
return;