devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=59ffefb9c1aa187435341d75f5811971ab917b2d

commit 59ffefb9c1aa187435341d75f5811971ab917b2d
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Nov 17 09:07:45 2015 -0500

    evas-software-x11: Fix returning NULL pointer
    
    evas_xlib_image_dri_native_set should be returning a pointer to an
    RGBA_Image on success, or NULL on failure. Returning EINA_FALSE here
    leads to an expression which evaluates to zero being treated as a null
    pointer constant
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/modules/evas/engines/software_x11/evas_xlib_dri_image.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c 
b/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c
index 527f1f9..2c1c72c 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c
@@ -564,12 +564,12 @@ evas_xlib_image_dri_native_set(void *data, void *image, 
void *native)
    unsigned int uidum, depth = 0;
 
    if (!ns || ns->type != EVAS_NATIVE_SURFACE_X11)
-     return EINA_FALSE;
+     return NULL;
 
    d = ob->priv.x11.xlib.disp;
    vis = ns->data.x11.visual;
    pm = ns->data.x11.pixmap;
-   if (!pm) return EINA_FALSE;
+   if (!pm) return NULL;
 
    XGetGeometry(d, pm, &wdum, &idum, &idum, &uidum, &uidum, &uidum, &depth);
 
@@ -581,14 +581,14 @@ evas_xlib_image_dri_native_set(void *data, void *image, 
void *native)
    if (!exim)
      {
         ERR("evas_xlib_image_dri_new failed.");
-        return EINA_FALSE;
+        return NULL;
      }
 
    exim->draw = (Drawable)ns->data.x11.pixmap;
 
    n = calloc(1, sizeof(DRI_Native));
    if (!n)
-     return EINA_FALSE;
+     return NULL;
 
    memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface));
    n->pixmap = pm;
@@ -601,7 +601,7 @@ evas_xlib_image_dri_native_set(void *data, void *image, 
void *native)
    im->native.func.free = _native_free_cb;
 
    if (evas_xlib_image_dri_init(exim, d)) evas_xlib_image_get_buffers(im);
-   else return EINA_FALSE;
+   else return NULL;
    return im;
 }
 

-- 


Reply via email to