diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-18 15:38:37 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-29 11:20:33 +0000 |
commit | d1801c23fae3777c7c59e084894a3410f7a1f932 (patch) | |
tree | 263906b86120ed712a9e02590871734d3bc888a8 /src/cairo-cache.c | |
parent | f0804d4856496a46d0b2270d5815856bf63b4cf8 (diff) |
Mark if(status) as being unlikely.
The error paths should be hit very rarely during normal operation, so mark
them as being unlikely so gcc may emit better code.
Diffstat (limited to 'src/cairo-cache.c')
-rw-r--r-- | src/cairo-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-cache.c b/src/cairo-cache.c index f5caba4b..73172642 100644 --- a/src/cairo-cache.c +++ b/src/cairo-cache.c @@ -131,7 +131,7 @@ _cairo_cache_create (cairo_cache_keys_equal_func_t keys_equal, } status = _cairo_cache_init (cache, keys_equal, entry_destroy, max_size); - if (status) { + if (unlikely (status)) { free (cache); return NULL; } @@ -293,7 +293,7 @@ _cairo_cache_insert (cairo_cache_t *cache, status = _cairo_hash_table_insert (cache->hash_table, (cairo_hash_entry_t *) entry); - if (status) + if (unlikely (status)) return status; cache->size += entry->size; |