diff --git a/ChangeLog b/ChangeLog index 56f52cc41..c018bcf5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-06-10 Carl Worth + + Originally: 2005-06-09 Carl Worth + + * 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. + 2005-06-10 Carl Worth * src/cairoint.h: diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 4bfcb8f88..ce4c41df2 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -1798,10 +1798,12 @@ _cairo_pdf_surface_show_page (void *abstract_surface) 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 diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c index f91ea1de1..0b80cc36d 100644 --- a/src/cairo-xcb-surface.c +++ b/src/cairo-xcb-surface.c @@ -569,10 +569,12 @@ _cairo_xcb_surface_acquire_source_image (void *abstract_surfa 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_xcb_surface_acquire_dest_image (void *abstract_surface 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 diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index 512e2ec7d..7a441c1ce 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -530,10 +530,12 @@ _cairo_xlib_surface_acquire_source_image (void *abstract_surf 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_xlib_surface_acquire_dest_image (void *abstract_surfac 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