forked from enlightenment/efl
Ecore: Fix warning and seg fault
Fix warning: large integer implicitly truncated to unsigned type. In ecore_x_window_prop_card32_list_get(): return -1 if malloc fails. Patch from OpenBSD via Jonathan Armani SVN revision: 65075
This commit is contained in:
parent
739751e6c3
commit
15d079882c
|
@ -109,11 +109,11 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
|
||||||
if (!val)
|
if (!val)
|
||||||
{
|
{
|
||||||
free(reply);
|
free(reply);
|
||||||
return num;
|
return -1;
|
||||||
}
|
}
|
||||||
data = xcb_get_property_value(reply);
|
data = xcb_get_property_value(reply);
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
val[i] = ((unsigned long *)data)[i];
|
val[i] = ((unsigned int *)data)[i];
|
||||||
*list = val;
|
*list = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue