summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-07-06 22:23:05 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-07-08 11:26:38 +0200
commit780534cd31af6f4837a4f5a0e445ae609c3559c3 (patch)
tree5f02e4f44bec855bea0313fe748a32960cf82a31
parent4679b28e211613391764919578161d400bc9075f (diff)
gstate: Remove useless code
gstate->source has been initialized as the static black pattern, so its status is success.
-rw-r--r--src/cairo-gstate.c12
1 files changed, 1 insertions, 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;
}
/**