diff options
author | Jonas Cleve <mail@jonascleve.de> | 2013-05-04 16:22:29 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-05-04 17:53:20 +0200 |
commit | 6a84138251cf8e14373c4bb4188fc804aaa0a311 (patch) | |
tree | 5688b35ba268e9e0d49406ec8031d6ed64b6a222 /src | |
parent | de8c6cba60a30b58c55d30284d0e119023a8caa5 (diff) |
fix #1017: i3status uses generic battery instance
Diffstat (limited to 'src')
-rw-r--r-- | src/print_battery_info.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/print_battery_info.c b/src/print_battery_info.c index 3fc31e0..03bacdf 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -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; |