emile: comparing less than zero with unsigned interger.
authorSubodh Kumar <s7158.kumar@samsung.com>
Mon, 9 Oct 2017 23:38:25 +0000 (16:38 -0700)
committerCedric Bail <cedric@osg.samsung.com>
Mon, 9 Oct 2017 23:38:28 +0000 (16:38 -0700)
Summary:
Unsigned integer should not be compared to less than zero.
@fix

Reviewers: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
src/lib/emile/emile_image.c

index 9a0bdb0..32722b7 100644 (file)
@@ -1602,7 +1602,7 @@ _emile_jpeg_head(Emile_Image *image,
         RECTS_CLIP_TO_RECT(load_region_x, load_region_y,
                            load_region_w, load_region_h,
                            0, 0, prop->w, prop->h);
-        if ((load_region_w <= 0) || (load_region_h <= 0))
+        if ((load_region_w == 0) || (load_region_h == 0))
           {
              jpeg_destroy_decompress(&cinfo);
              _emile_jpeg_membuf_src_term(&cinfo);