mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 16:58:01 +02:00
Fix up a couple of likely(malloc==NULL)
Adrian Johnson spotted that I marked a few malloc failures as likely, whoops.
This commit is contained in:
parent
1659db2c1f
commit
7247017cf5
2 changed files with 3 additions and 3 deletions
|
|
@ -2233,7 +2233,7 @@ _cairo_cff_fallback_init (cairo_cff_subset_t *cff_subset,
|
|||
}
|
||||
|
||||
cff_subset->widths = calloc (sizeof (int), font->scaled_font_subset->num_glyphs);
|
||||
if (likely (cff_subset->widths == NULL)) {
|
||||
if (unlikely (cff_subset->widths == NULL)) {
|
||||
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
goto fail3;
|
||||
}
|
||||
|
|
@ -2248,7 +2248,7 @@ _cairo_cff_fallback_init (cairo_cff_subset_t *cff_subset,
|
|||
cff_subset->descent = type2_subset.y_min;
|
||||
|
||||
cff_subset->data = malloc (length);
|
||||
if (likely (cff_subset->data == NULL)) {
|
||||
if (unlikely (cff_subset->data == NULL)) {
|
||||
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
goto fail4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ _cairo_clip_intersect_path (cairo_clip_t *clip,
|
|||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
clip_path = malloc (sizeof (cairo_clip_path_t));
|
||||
if (likely (clip_path == NULL))
|
||||
if (unlikely (clip_path == NULL))
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
||||
status = _cairo_path_fixed_init_copy (&clip_path->path, path);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue