[cairo-commit] src/cairo-xcb-surface.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Tue Oct 5 02:04:30 PDT 2010


 src/cairo-xcb-surface.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit f20814e07e7032c14f273d712f35e19addfdae80
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Oct 5 10:36:38 2010 +0200

    xcb: Do not return value in void function
    
    Sun Studio Compiler complains:
    "cairo-xcb-surface.c", line 585: void function cannot return value
    even if the returned value is void.
    Some minor code restructuring removes the issue.

diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 9c2d3a7..d852f50 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -580,12 +580,10 @@ _cairo_xcb_surface_release_source_image (void *abstract_surface,
 {
     cairo_xcb_surface_t *surface = abstract_surface;
 
-    if (surface->drm != NULL && ! surface->marked_dirty) {
-	return _cairo_surface_release_source_image (surface->drm,
-						    image, image_extra);
-    }
-
-    cairo_surface_destroy (&image->base);
+    if (surface->drm != NULL && !surface->marked_dirty)
+	_cairo_surface_release_source_image (surface->drm, image, image_extra);
+    else
+	cairo_surface_destroy (&image->base);
 }
 
 static cairo_bool_t


More information about the cairo-commit mailing list