efl: unsigned int/long never be less than zero. Fixed.
authorPrince Kumar Dubey <prince.dubey@samsung.com>
Fri, 13 Oct 2017 19:07:25 +0000 (12:07 -0700)
committerCedric Bail <cedric@osg.samsung.com>
Fri, 13 Oct 2017 19:07:28 +0000 (12:07 -0700)
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5300

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
src/bin/evas/evas_cserve2_index.c
src/examples/eina/eina_simple_xml_parser_02.c
src/lib/ecore_con/ecore_con_local_win32.c
src/lib/ecore_win32/ecore_win32_window.c
src/lib/ecore_x/ecore_x_e.c
src/lib/ecore_x/ecore_x_keygrab.c
src/modules/evas/image_loaders/ico/evas_image_load_ico.c

index 42bcffa..76d4e62 100644 (file)
@@ -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);
index 0d8269a..5c0cf08 100644 (file)
@@ -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)
      {
index 4bd0ba4..9a5b731 100644 (file)
@@ -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)
index f9629f7..628264d 100644 (file)
@@ -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");
index 9999af1..8d10ba0 100644 (file)
@@ -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
      {
index 4ed762d..64f342b 100644 (file)
@@ -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);
index 0754ba4..53ce8e8 100644 (file)
@@ -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;