stefan pushed a commit to branch master.
commit f5b322a824967c8385c6c730895a2b0ba37790be
Author: Stefan Schmidt <[email protected]>
Date: Wed Apr 3 16:23:33 2013 +0100
eeze/sensor/tizen: USe enum sentinel to iterate over sensor types.
With the newer version we now have a sentinel that marks the last item of
the enum.
---
src/modules/eeze/sensor/tizen/tizen.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/modules/eeze/sensor/tizen/tizen.c
b/src/modules/eeze/sensor/tizen/tizen.c
index b22bf63..603cc7b 100644
--- a/src/modules/eeze/sensor/tizen/tizen.c
+++ b/src/modules/eeze/sensor/tizen/tizen.c
@@ -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)
--
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html