[cairo-commit] cairo/src cairo-pdf-surface.c, 1.43, 1.44 cairo-xcb-surface.c, 1.33, 1.34 cairo-xlib-surface.c, 1.76, 1.77

Carl Worth commit at pdx.freedesktop.org
Fri Jun 10 12:46:51 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv28960/src

Modified Files:
	cairo-pdf-surface.c cairo-xcb-surface.c cairo-xlib-surface.c 
Log Message:

        Originally: 2005-06-09  Carl Worth  <cworth at cworth.org>

        * src/cairo-pdf-surface.c: (_cairo_pdf_surface_show_page):
        * src/cairo-xcb-surface.c:
        (_cairo_xcb_surface_acquire_source_image),
        (_cairo_xcb_surface_acquire_dest_image):
        * src/cairo-xlib-surface.c:
        (_cairo_xlib_surface_acquire_source_image),
        (_cairo_xlib_surface_acquire_dest_image): Rework occurrences
        of 'if (status == CAIRO_STATUS_SUCCESS)' to use 'if (status)'
        instead where trivial.


Index: cairo-pdf-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-pdf-surface.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- cairo-pdf-surface.c	10 Jun 2005 19:18:21 -0000	1.43
+++ cairo-pdf-surface.c	10 Jun 2005 19:46:49 -0000	1.44
@@ -1798,10 +1798,12 @@
     cairo_int_status_t status;
 
     status = _cairo_pdf_document_add_page (document, surface);
-    if (status == CAIRO_STATUS_SUCCESS)
-	_cairo_pdf_surface_clear (surface);
+    if (status)
+	return status;
 
-    return status;
+    _cairo_pdf_surface_clear (surface);
+
+    return CAIRO_STATUS_SUCCESS;
 }
 
 static cairo_int_status_t

Index: cairo-xcb-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xcb-surface.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- cairo-xcb-surface.c	10 Jun 2005 19:18:21 -0000	1.33
+++ cairo-xcb-surface.c	10 Jun 2005 19:46:49 -0000	1.34
@@ -569,10 +569,12 @@
     cairo_status_t status;
 
     status = _get_image_surface (surface, NULL, &image, NULL);
-    if (status == CAIRO_STATUS_SUCCESS)
-	*image_out = image;
+    if (status)
+	return status;
 
-    return status;
+    *image_out = image;
+
+    return CAIRO_STATUS_SUCCESS;
 }
 
 static void
@@ -595,10 +597,12 @@
     cairo_status_t status;
 
     status = _get_image_surface (surface, interest_rect, &image, image_rect_out);
-    if (status == CAIRO_STATUS_SUCCESS)
-	*image_out = image;
+    if (status)
+	return status;
 
-    return status;
+    *image_out = image;
+
+    return CAIRO_STATUS_SUCCESS;
 }
 
 static void

Index: cairo-xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-surface.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- cairo-xlib-surface.c	10 Jun 2005 19:18:21 -0000	1.76
+++ cairo-xlib-surface.c	10 Jun 2005 19:46:49 -0000	1.77
@@ -530,10 +530,12 @@
     cairo_status_t status;
 
     status = _get_image_surface (surface, NULL, &image, NULL);
-    if (status == CAIRO_STATUS_SUCCESS)
-	*image_out = image;
+    if (status)
+	return status;
 
-    return status;
+    *image_out = image;
+
+    return CAIRO_STATUS_SUCCESS;
 }
 
 static void
@@ -556,10 +558,12 @@
     cairo_status_t status;
 
     status = _get_image_surface (surface, interest_rect, &image, image_rect_out);
-    if (status == CAIRO_STATUS_SUCCESS)
-	*image_out = image;
+    if (status)
+	return status;
 
-    return status;
+    *image_out = image;
+
+    return CAIRO_STATUS_SUCCESS;
 }
 
 static void




More information about the cairo-commit mailing list