edje: Fix coverity warning

CID 1355234 Logically dead code

The indicated dead code may have performed some action;
that action will never occur.
In eet_data_descriptor_element_add: Code can never be
reached because of a logical contradiction (CWE-561)

Solution: use explicit range within valid values with <= and >=
rather than excluded values with > and <
This commit is contained in:
Jean-Philippe Andre 2016-07-13 15:44:58 +09:00
parent cdc8d15a5c
commit 1b6825d3fe
1 changed files with 2 additions and 3 deletions

View File

@ -2223,9 +2223,8 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor *edd,
*/
if ((group_type > EET_G_UNKNOWN)
&& (group_type < EET_G_LAST)
&& (((type > EET_T_UNKNOW) && (type < EET_T_STRING))
|| ((type > EET_T_NULL) && (type < EET_T_VALUE))
|| ((type > EET_T_VALUE) && (type < EET_T_LAST)))
&& (((type >= EET_T_CHAR) && (type <= EET_T_ULONG_LONG))
|| ((type >= EET_T_F32P32) && (type <= EET_T_F8P24)))
&& (!subtype))
{
subtype = calloc(1, sizeof (Eet_Data_Descriptor));