diff options
Diffstat (limited to 'src/cairo-path.c')
-rw-r--r-- | src/cairo-path.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cairo-path.c b/src/cairo-path.c index c6639f3f..84dfc0c4 100644 --- a/src/cairo-path.c +++ b/src/cairo-path.c @@ -127,7 +127,7 @@ _cairo_path_count (cairo_path_t *path, &cpc); } - if (status) + if (unlikely (status)) return -1; return cpc.count; @@ -283,7 +283,7 @@ _cairo_path_populate (cairo_path_t *path, &cpp); } - if (status) + if (unlikely (status)) return status; /* Sanity check the count */ @@ -302,7 +302,7 @@ _cairo_path_create_in_error (cairo_status_t status) return (cairo_path_t*) &_cairo_path_nil; path = malloc (sizeof (cairo_path_t)); - if (path == NULL) { + if (unlikely (path == NULL)) { _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_path_t*) &_cairo_path_nil; } @@ -322,7 +322,7 @@ _cairo_path_create_internal (cairo_path_fixed_t *path_fixed, cairo_path_t *path; path = malloc (sizeof (cairo_path_t)); - if (path == NULL) { + if (unlikely (path == NULL)) { _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_path_t*) &_cairo_path_nil; } @@ -337,8 +337,8 @@ _cairo_path_create_internal (cairo_path_fixed_t *path_fixed, if (path->num_data) { path->data = _cairo_malloc_ab (path->num_data, - sizeof (cairo_path_data_t)); - if (path->data == NULL) { + sizeof (cairo_path_data_t)); + if (unlikely (path->data == NULL)) { free (path); _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return (cairo_path_t*) &_cairo_path_nil; @@ -474,7 +474,7 @@ _cairo_path_append_to_context (const cairo_path_t *path, } status = cairo_status (cr); - if (status) + if (unlikely (status)) return status; } |