mbpfan-josie

Fixes #38

0526fc5ff93492148c9b15c58fcce168a8c97b78
Daniel Graziotin <daniel@ineed.coffee> · 2014-06-22T17:07 · browse files at this commit

parents: d14c710

diff --git a/src/mbpfan.c b/src/mbpfan.c
index 9f09aad..c75c5db 100644
--- a/src/mbpfan.c
+++ b/src/mbpfan.c
@@ -85,6 +85,7 @@ bool is_legacy_kernel()
     return (kernel_version < 15);
 }
 
+
 t_sensors *retrieve_sensors()
 {
 
@@ -103,7 +104,7 @@ t_sensors *retrieve_sensors()
             }
         }
 
-        path_begin = "/sys/devices/platform/coretemp.0/temp";
+        path_begin = (char *) "/sys/devices/platform/coretemp.0/temp";
 
     } else {
 
@@ -115,10 +116,9 @@ t_sensors *retrieve_sensors()
             }
         }
 
-        path_begin = "/sys/devices/platform/coretemp.0/hwmon/hwmon";
+        path_begin = (char *) "/sys/devices/platform/coretemp.0/hwmon/hwmon";
 
         int counter;
-
         for (counter = 0; counter < 10; counter++) {
 
             char hwmon_path[strlen(path_begin)+1];
@@ -154,9 +154,9 @@ t_sensors *retrieve_sensors()
     char number[2];
     sprintf(number,"%d",0);
 
-    int counter = 0;
     int sensors_found = 0;
 
+    int counter = 0;
     for(counter = 0; counter<10; counter++) {
         path = (char*) malloc(sizeof( char ) * path_size);
 
@@ -208,6 +208,7 @@ t_sensors *retrieve_sensors()
     return sensors_head;
 }
 
+
 t_fans *retrieve_fans()
 {
 
@@ -376,6 +377,7 @@ unsigned short get_temp(t_sensors* sensors)
     return temp;
 }
 
+
 void retrieve_settings(const char* settings_path)
 {
     Settings *settings = NULL;