eeze/sensor/tizen: USe enum sentinel to iterate over sensor types.
authorStefan Schmidt <s.schmidt@samsung.com>
Wed, 3 Apr 2013 15:23:33 +0000 (16:23 +0100)
committerStefan Schmidt <s.schmidt@samsung.com>
Wed, 3 Apr 2013 16:14:20 +0000 (17:14 +0100)
With the newer version we now have a sentinel that marks the last item of the enum.

src/modules/eeze/sensor/tizen/tizen.c

index b22bf63..603cc7b 100644 (file)
@@ -769,8 +769,7 @@ eeze_sensor_tizen_sensors_find(void)
    sensor_type_e type;
    bool supported = 0;
 
-   /* FIXME: Make this safe against changes in the enum. But how? */
-   for (type = SENSOR_ACCELEROMETER; type <= SENSOR_MOTION_FACEDOWN; type++)
+   for (type = SENSOR_ACCELEROMETER; type <= SENSOR_LAST; type++)
      {
         sensor_is_supported(type, &supported);
         if (supported)