[cairo-commit] 2 commits - src/cairo-surface.c util/cairo-script
Bryce Harrington
bryce at kemper.freedesktop.org
Mon Aug 21 23:29:29 UTC 2017
src/cairo-surface.c | 4 ----
util/cairo-script/cairo-script-operators.c | 4 ++--
2 files changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 339fe9a7689dd13626410afabb77b12ad0f9f7d2
Author: Guillermo Rodriguez <guillerodriguez.dev at gmail.com>
Date: Tue Jul 4 12:19:37 2017 +0200
Remove redundant check.
Spotted by David Kastrup <dak at gnu.org>.
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 5436ed96..6f25bd7c 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -504,13 +504,9 @@ cairo_surface_create_similar (cairo_surface_t *other,
return _cairo_surface_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
if (unlikely (width < 0 || height < 0))
return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
-
if (unlikely (! CAIRO_CONTENT_VALID (content)))
return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_CONTENT);
- if (unlikely (other->status))
- return _cairo_surface_create_in_error (other->status);
-
/* We inherit the device scale, so create a larger surface */
width = width * other->device_transform.xx;
height = height * other->device_transform.yy;
commit 5ac7b3652d4d96bfdc5efe50c2540fb4eadeb7d9
Author: Guillermo Rodriguez <guillerodriguez.dev at gmail.com>
Date: Tue Jul 4 12:21:02 2017 +0200
script: Fix misleading indentation warning.
Spotted by David Kastrup <dak at gnu.org>.
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index aa38823b..e493311e 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -4810,8 +4810,8 @@ _set_dash (csi_t *ctx)
if (_csi_likely (array->stack.len < ARRAY_LENGTH (stack_dashes))) {
dashes = stack_dashes;
} else {
- if (_csi_unlikely ((unsigned) array->stack.len >= INT_MAX / sizeof (double)))
- return _csi_error (CSI_STATUS_NO_MEMORY);
+ if (_csi_unlikely ((unsigned) array->stack.len >= INT_MAX / sizeof (double)))
+ return _csi_error (CSI_STATUS_NO_MEMORY);
dashes = _csi_alloc (ctx, sizeof (double) * array->stack.len);
if (_csi_unlikely (dashes == NULL))
return _csi_error (CSI_STATUS_NO_MEMORY);
More information about the cairo-commit
mailing list