Set the minimum value of tracker_type_e
[platform/core/system/libtracker.git] / src / tracker.c
index 4b34711..8f55549 100644 (file)
@@ -24,7 +24,7 @@ API int tracker_get_ref_counter(tracker_type_e type, int *cnt)
 {
        int ref;
 
-       if (type < 0 || type >= TRACKER_TYPE_MAX || !trackers[type]) {
+       if (type <= TRACKER_TYPE_INVALID || type >= TRACKER_TYPE_MAX || !trackers[type]) {
                _E("Try to access not existed tracker %d", type);
                return TRACKER_ERROR_INVALID_PARAMETER;
        }
@@ -43,7 +43,7 @@ API int tracker_get_tick(tracker_type_e type, int *cnt)
 {
        int count;
 
-       if (type < 0 || type >= TRACKER_TYPE_MAX || !trackers[type]) {
+       if (type <= TRACKER_TYPE_INVALID || type >= TRACKER_TYPE_MAX || !trackers[type]) {
                _E("Try to access not existed tracker %d", type);
                return TRACKER_ERROR_INVALID_PARAMETER;
        }