summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-screen.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-11-18 17:26:55 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-11-29 11:20:34 +0000
commite6963a5bfebda69a1ef0a986cede84bcd955b6d4 (patch)
treea70bd8d15c60a71ba88bdf299244f93aa7b147d0 /src/cairo-xlib-screen.c
parentd1801c23fae3777c7c59e084894a3410f7a1f932 (diff)
downloadcairo-e6963a5bfebda69a1ef0a986cede84bcd955b6d4.tar.gz
Mark allocation failures as unlikely.
Use the gcc likelihood annotation to indicate that allocation failures are extremely unlikely.
Diffstat (limited to 'src/cairo-xlib-screen.c')
-rw-r--r--src/cairo-xlib-screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index 1878f8e7a..3b1ae2e16 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -352,7 +352,7 @@ _cairo_xlib_screen_info_get (cairo_xlib_display_t *display,
info = _cairo_xlib_screen_info_reference (info);
} else {
info = malloc (sizeof (cairo_xlib_screen_info_t));
- if (info == NULL)
+ if (unlikely (info == NULL))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
CAIRO_REFERENCE_COUNT_INIT (&info->ref_count, 2); /* Add one for display cache */