elm: config: check return value of eina_value_get instead of returning always TRUE
authorStefan Schmidt <stefan@osg.samsung.com>
Mon, 5 Dec 2016 16:00:56 +0000 (17:00 +0100)
committerStefan Schmidt <stefan@osg.samsung.com>
Mon, 5 Dec 2016 16:07:39 +0000 (17:07 +0100)
There is always a chance that eina_value_get will not return EINA_TRUE here so
better check it and use it as return value directly.

CID: 1357138

src/lib/elementary/elm_config.c

index bd496ee..0af9d58 100644 (file)
@@ -4348,8 +4348,7 @@ _eina_value_to_int(const Eina_Value *val, int *i)
 
    if (eina_value_type_get(val) == EINA_VALUE_TYPE_INT)
      {
-        eina_value_get(val, i);
-        return EINA_TRUE;
+        return eina_value_get(val, i);
      }
 
    ival = eina_value_new(EINA_VALUE_TYPE_INT);