]> git.sur5r.net Git - i3/i3status/commitdiff
Fix undeclared identifier thermal_zone error
authorAlexis Hildebrandt <afh@surryhill.net>
Wed, 10 Jun 2015 17:03:29 +0000 (19:03 +0200)
committerAlexis Hildebrandt <afh@surryhill.net>
Mon, 6 Jul 2015 13:47:44 +0000 (15:47 +0200)
when THERMAL_ZONE is not defined.

src/print_cpu_temperature.c

index c0a6baa11569da421ab09068d01736cad57c1466..71ee4d4c57ecf164817d54de4190e05f6148bdcd 100644 (file)
@@ -261,8 +261,8 @@ void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const
     OUTPUT_FULL_TEXT(buffer);
     return;
 error:
     OUTPUT_FULL_TEXT(buffer);
     return;
 error:
-#endif
     free(thermal_zone);
     free(thermal_zone);
+#endif
 
     OUTPUT_FULL_TEXT("can't read temp");
     (void)fputs("i3status: Cannot read temperature. Verify that you have a thermal zone in /sys/class/thermal or disable the cpu_temperature module in your i3status config.\n", stderr);
 
     OUTPUT_FULL_TEXT("can't read temp");
     (void)fputs("i3status: Cannot read temperature. Verify that you have a thermal zone in /sys/class/thermal or disable the cpu_temperature module in your i3status config.\n", stderr);