From e89b081f45d1181c082ed4f04944db83fbebf914 Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 4 Jan 2017 10:53:09 +0100 Subject: [PATCH] Fix for commented out paths for temperature input in config --- wmtemp/wmtemp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wmtemp/wmtemp.c b/wmtemp/wmtemp.c index 4e23a80..7c90227 100644 --- a/wmtemp/wmtemp.c +++ b/wmtemp/wmtemp.c @@ -230,31 +230,31 @@ void parse_config(struct config *conf) { strncpy (value, item, MAXLEN); strip(value); - if (!strcmp(name, "cpu1_path")){ + if (strncmp(name, "cpu1_path", 9) == 0){ free(cfg.cpu1.path); cfg.cpu1.path = malloc(sizeof(value) + 1); strcpy(cfg.cpu1.path, value); } - if (!strcmp(name, "cpu2_path")){ + if (strncmp(name, "cpu2_path", 9) == 0){ free(cfg.cpu2.path); cfg.cpu2.path = malloc(sizeof(value) + 1); strcpy(cfg.cpu2.path, value); } - if (!strcmp(name, "cpu1_path")){ + if (strncmp(name, "cpu3_path", 9) == 0){ free(cfg.cpu3.path); cfg.cpu3.path = malloc(sizeof(value) + 1); strcpy(cfg.cpu3.path, value); } - if (!strcmp(name, "cpu1_path")){ + if (strncmp(name, "cpu4_path", 9) == 0){ free(cfg.cpu4.path); cfg.cpu4.path = malloc(sizeof(value) + 1); strcpy(cfg.cpu4.path, value); } - if (!strcmp(name, "gpu_path")){ + if (strncmp(name, "gpu_path", 8) == 0){ free(cfg.gpu.path); cfg.gpu.path = malloc(sizeof(value) + 1); strcpy(cfg.gpu.path, value);