X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fmain.c;h=a8e3f61625bad881391484741e12250257036b9b;hb=8a3d16ade26321374c684080d627cf12ba71e598;hp=901ee4b5c148e63c29f78b39bda76030b635536b;hpb=df3cbe065f1058cb1e060122a6dbb8fd254a637d;p=psensor.git diff --git a/src/main.c b/src/main.c index 901ee4b..a8e3f61 100644 --- a/src/main.c +++ b/src/main.c @@ -283,6 +283,7 @@ static void associate_cb_alarm_raised(struct psensor **sensors, struct ui_psensor *ui) { struct psensor **sensor_cur = sensors; + while (*sensor_cur) { struct psensor *s = *sensor_cur; @@ -304,6 +305,7 @@ associate_cb_alarm_raised(struct psensor **sensors, struct ui_psensor *ui) static void associate_preferences(struct psensor **sensors) { struct psensor **sensor_cur = sensors; + while (*sensor_cur) { char *n; struct psensor *s = *sensor_cur; @@ -331,7 +333,7 @@ static void log_init() dir = get_psensor_user_dir(); if (!dir) - return ; + return; path = malloc(strlen(dir)+1+strlen("log")+1); sprintf(path, "%s/%s", dir, "log");