forked from enlightenment/efl
efl: unsigned int/long never be less than zero. Fixed.
Reviewers: raster, cedric Subscribers: rajeshps, jpeg Differential Revision: https://phab.enlightenment.org/D5300 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
parent
cb4a17ab22
commit
41197981ab
|
@ -200,7 +200,7 @@ _shared_data_shm_resize(Data_Shm *ds, size_t newsize)
|
|||
Shm_Handle *shm;
|
||||
size_t mapping_size;
|
||||
|
||||
if (newsize <= 0)
|
||||
if (newsize == 0)
|
||||
return -1;
|
||||
|
||||
mapping_size = cserve2_shm_size_normalize(newsize, ARRAY_MINSIZE);
|
||||
|
|
|
@ -17,7 +17,7 @@ static Eina_Bool
|
|||
_xml_tag_parse_cb(void *data, Eina_Simple_XML_Type type, const char *content,
|
||||
unsigned offset EINA_UNUSED, unsigned int length)
|
||||
{
|
||||
if (length <= 0) return EINA_FALSE;
|
||||
if (length == 0) return EINA_FALSE;
|
||||
|
||||
if (type == EINA_SIMPLE_XML_OPEN)
|
||||
{
|
||||
|
|
|
@ -681,7 +681,7 @@ ecore_con_local_win32_server_flush(Ecore_Con_Server *obj)
|
|||
return EINA_FALSE;
|
||||
|
||||
num = eina_binbuf_length_get(svr->buf) - svr->write_buf_offset;
|
||||
if (num <= 0) return EINA_TRUE;
|
||||
if (num == 0) return EINA_TRUE;
|
||||
|
||||
res = WriteFile(svr->pipe, eina_binbuf_string_get(svr->buf) + svr->write_buf_offset, num, &written, NULL);
|
||||
if (!res)
|
||||
|
@ -732,7 +732,7 @@ ecore_con_local_win32_client_flush(Ecore_Con_Client *obj)
|
|||
return EINA_FALSE;
|
||||
|
||||
num = eina_binbuf_length_get(cl->buf) - cl->buf_offset;
|
||||
if (num <= 0) return EINA_TRUE;
|
||||
if (num == 0) return EINA_TRUE;
|
||||
|
||||
res = WriteFile(svr->pipe, eina_binbuf_string_get(cl->buf) + cl->buf_offset, num, &written, NULL);
|
||||
if (!res)
|
||||
|
|
|
@ -1477,7 +1477,7 @@ ecore_win32_window_state_set(Ecore_Win32_Window *window,
|
|||
{
|
||||
unsigned int i;
|
||||
|
||||
if (!window || !state || (num <= 0))
|
||||
if (!window || !state || (num == 0))
|
||||
return;
|
||||
|
||||
INF("setting window state");
|
||||
|
|
|
@ -1173,7 +1173,7 @@ ecore_x_e_window_profile_list_set(Ecore_X_Window win,
|
|||
if (!win)
|
||||
return;
|
||||
|
||||
if ((!profiles) || (num_profiles <= 0))
|
||||
if ((!profiles) || (num_profiles == 0))
|
||||
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_WINDOW_PROFILE_AVAILABLE_LIST);
|
||||
else
|
||||
{
|
||||
|
@ -1382,7 +1382,7 @@ ecore_x_e_window_available_profiles_set(Ecore_X_Window win,
|
|||
if (!win)
|
||||
return;
|
||||
|
||||
if ((!profiles) || (count <= 0))
|
||||
if ((!profiles) || (count == 0))
|
||||
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_WINDOW_PROFILE_AVAILABLE_LIST);
|
||||
else
|
||||
{
|
||||
|
|
|
@ -542,7 +542,7 @@ _ecore_x_window_keygrab_unset_internal(Ecore_X_Window win,
|
|||
if (!_ecore_x_window_keytable_get(win, &keytable))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (keytable.key_cnt <= 0)
|
||||
if (keytable.key_cnt == 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
i = _ecore_x_window_keytable_key_search(&keytable, keycode);
|
||||
|
|
|
@ -229,7 +229,7 @@ evas_image_load_file_head_ico(void *loader_data,
|
|||
//else hot_y = word;
|
||||
if (!read_uint(map, fsize, &position, &bmsize)) goto close_file;
|
||||
if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file;
|
||||
if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file;
|
||||
if ((bmsize == 0) || (bmoffset == 0) || (bmoffset >= fsize)) goto close_file;
|
||||
if (search == BIGGEST)
|
||||
{
|
||||
pdelta = prop->w * prop->h;
|
||||
|
@ -461,7 +461,7 @@ evas_image_load_file_data_ico(void *loader_data,
|
|||
//else hot_y = word;
|
||||
if (!read_uint(map, fsize, &position, &bmsize)) goto close_file;
|
||||
if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file;
|
||||
if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file;
|
||||
if ((bmsize == 0) || (bmoffset == 0) || (bmoffset >= fsize)) goto close_file;
|
||||
if (search == BIGGEST)
|
||||
{
|
||||
pdelta = w * h;
|
||||
|
|
Loading…
Reference in New Issue