From 780534cd31af6f4837a4f5a0e445ae609c3559c3 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Wed, 6 Jul 2011 22:23:05 +0200 Subject: gstate: Remove useless code gstate->source has been initialized as the static black pattern, so its status is success. --- src/cairo-gstate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index ac73ca96..d9672c22 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -86,8 +86,6 @@ cairo_status_t _cairo_gstate_init (cairo_gstate_t *gstate, cairo_surface_t *target) { - cairo_status_t status; - VG (VALGRIND_MAKE_MEM_UNDEFINED (gstate, sizeof (cairo_gstate_t))); gstate->next = NULL; @@ -131,15 +129,7 @@ _cairo_gstate_init (cairo_gstate_t *gstate, /* Now that the gstate is fully initialized and ready for the eventual * _cairo_gstate_fini(), we can check for errors (and not worry about * the resource deallocation). */ - status = target->status; - if (unlikely (status)) - return status; - - status = gstate->source->status; - if (unlikely (status)) - return status; - - return CAIRO_STATUS_SUCCESS; + return target->status; } /** -- cgit v1.2.3