From: Ewgenij Starostin Date: Fri, 4 May 2012 03:34:13 +0000 (+0200) Subject: Handle %d with non-default CPU temperature path. X-Git-Tag: 2.5.1~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b5f89c83cc47ed4cfdaf0e61748229a14e2b5e3d;p=i3%2Fi3status Handle %d with non-default CPU temperature path. --- diff --git a/src/print_cpu_temperature.c b/src/print_cpu_temperature.c index 41c3c9c..742a102 100644 --- a/src/print_cpu_temperature.c +++ b/src/print_cpu_temperature.c @@ -38,10 +38,11 @@ void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const char *outwalk = buffer; static char buf[16]; - if (path == NULL) { + if (path == NULL) asprintf(&thermal_zone, THERMAL_ZONE, zone); - path = thermal_zone; - } + else + asprintf(&thermal_zone, path, zone); + path = thermal_zone; INSTANCE(path);