haptic: Modify higher bound for haptic level 05/80005/2
authorpr.jung <pr.jung@samsung.com>
Thu, 14 Jul 2016 05:26:47 +0000 (14:26 +0900)
committerpr.jung <pr.jung@samsung.com>
Thu, 14 Jul 2016 05:34:27 +0000 (14:34 +0900)
Change-Id: Ic814a2ae52c304dd6533ba7fca909e8d55fcc673
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/haptic/haptic.c

index cafce61..b5ab3e7 100644 (file)
@@ -857,7 +857,7 @@ static int parse_section(struct parse_result *result, void *user_data, int index
                conf->sound_capture = atoi(result->value);
        } else if (MATCH(result->name, "level")) {
                conf->level = atoi(result->value);
-               if (conf->level < 0 || conf->level >= INT_MAX) {
+               if (conf->level < 0 || conf->level >= INT_MAX - 1) {
                        _E("You must set level with positive number in integer range");
                        return -EINVAL;
                }