summaryrefslogtreecommitdiff
path: root/src/cairo-polygon.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-04-08 21:29:19 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-04-09 15:06:11 +0100
commit619425a8b3bff79fb453f4b84e3a8e75db369b40 (patch)
tree69188fe0ee1d8ef1d12eb397c7ae6e102164b61a /src/cairo-polygon.c
parent4b195779a465f69b035e9fd6695ef5c137a6b342 (diff)
cairo-polygon - trivial propagation of error status
_cairo_polygon_move_to() returns an error status so use it.
Diffstat (limited to 'src/cairo-polygon.c')
-rw-r--r--src/cairo-polygon.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cairo-polygon.c b/src/cairo-polygon.c
index bba9e938..c79eedc7 100644
--- a/src/cairo-polygon.c
+++ b/src/cairo-polygon.c
@@ -134,9 +134,7 @@ _cairo_polygon_add_edge (cairo_polygon_t *polygon, cairo_point_t *p1, cairo_poin
polygon->num_edges++;
DONE:
- _cairo_polygon_move_to (polygon, p2);
-
- return CAIRO_STATUS_SUCCESS;
+ return _cairo_polygon_move_to (polygon, p2);
}
cairo_status_t
@@ -153,12 +151,12 @@ _cairo_polygon_move_to (cairo_polygon_t *polygon, cairo_point_t *point)
cairo_status_t
_cairo_polygon_line_to (cairo_polygon_t *polygon, cairo_point_t *point)
{
- cairo_status_t status = CAIRO_STATUS_SUCCESS;
+ cairo_status_t status;
if (polygon->has_current_point) {
status = _cairo_polygon_add_edge (polygon, &polygon->current_point, point);
} else {
- _cairo_polygon_move_to (polygon, point);
+ status = _cairo_polygon_move_to (polygon, point);
}
return status;