e_info_client: remove duplicated range check while read uint from string. 74/259674/1
authorJunseok, Kim <juns.kim@samsung.com>
Fri, 11 Jun 2021 01:55:57 +0000 (10:55 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Fri, 11 Jun 2021 01:55:57 +0000 (10:55 +0900)
Because of above line already checked out of bound of the ulong from string,
The check that greater than max of uint has no affect to result.
So, remove that check code.

Change-Id: I0ef61639664c592f02dbf6d4dd095bea46c4b596
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/bin/e_info_client.c

index c8ac9ec..434c7f9 100644 (file)
@@ -133,7 +133,6 @@ _util_string_to_uint(const char *str, unsigned int *num, int base)
    EINA_SAFETY_ON_TRUE_RETURN_VAL((end == str), EINA_FALSE); /* given string is not a decimal number */
    EINA_SAFETY_ON_TRUE_RETURN_VAL(('\0' != *end), EINA_FALSE); /* given string has extra characters */
    EINA_SAFETY_ON_TRUE_RETURN_VAL(((ULONG_MAX == ul) && (ERANGE == errsv)), EINA_FALSE); /* out of range of type unsigned long int */
-   EINA_SAFETY_ON_TRUE_RETURN_VAL((ul > UINT_MAX), EINA_FALSE); /* greater than UINT_MAX */
 
    *num = (unsigned int)ul;