summaryrefslogtreecommitdiff
path: root/src/print_cpu_temperature.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_cpu_temperature.c')
-rw-r--r--src/print_cpu_temperature.c7
1 files changed, 4 insertions, 3 deletions
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);