]> git.sur5r.net Git - i3/i3status/commitdiff
Handle %d with non-default CPU temperature path.
authorEwgenij Starostin <ewgenij@ewgenij-starostin.name>
Fri, 4 May 2012 03:34:13 +0000 (05:34 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 4 May 2012 10:29:02 +0000 (12:29 +0200)
src/print_cpu_temperature.c

index 41c3c9c6097ff04e7d09044737a3d01a0ca47265..742a102618eac161220fcbd6444d8acd2ac3c539 100644 (file)
@@ -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);