Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/temperature


Modified Files:
        e_mod_config.c 


Log Message:
Check if the sensor name has been set

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/temperature/e_mod_config.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- e_mod_config.c      20 Apr 2006 11:30:25 -0000      1.19
+++ e_mod_config.c      7 Jun 2006 08:34:10 -0000       1.20
@@ -103,12 +103,16 @@
    else if (p > TEMP_HIGH_MID) 
      cfdata->high_method = TEMP_HIGH_HIGH;
    
-   if (!strcmp(temperature_config->sensor_name, "temp1")) 
-     cfdata->sensor = 0;
-   else if (!strcmp(temperature_config->sensor_name, "temp2")) 
-     cfdata->sensor = 1;
-   else if (!strcmp(temperature_config->sensor_name, "temp3")) 
-     cfdata->sensor = 2;
+   cfdata->sensor = 0;
+   if (temperature_config->sensor_name)
+     {
+       if (!strcmp(temperature_config->sensor_name, "temp1")) 
+         cfdata->sensor = 0;
+       else if (!strcmp(temperature_config->sensor_name, "temp2")) 
+         cfdata->sensor = 1;
+       else if (!strcmp(temperature_config->sensor_name, "temp3")) 
+         cfdata->sensor = 2;
+     }
 }
 
 static void *




_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to