From 7df796433357ec1bb9e448406ded9ba48c6d839f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 30 Aug 2011 15:17:41 +0100 Subject: observer: Add missing return codes Upon detecting the user error, supply an error code! Signed-off-by: Chris Wilson --- src/cairo-surface-observer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cairo-surface-observer.c') diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c index 75f2a46b..92f26240 100644 --- a/src/cairo-surface-observer.c +++ b/src/cairo-surface-observer.c @@ -1825,10 +1825,10 @@ cairo_surface_observer_elapsed (cairo_surface_t *abstract_surface) cairo_surface_observer_t *surface; if (unlikely (CAIRO_REFERENCE_COUNT_IS_INVALID (&abstract_surface->ref_count))) - return; + return -1; if (! _cairo_surface_is_observer (abstract_surface)) - return; + return -1; surface = (cairo_surface_observer_t *) abstract_surface; return _cairo_observation_total_elapsed_ns (&surface->log); @@ -1861,10 +1861,10 @@ cairo_device_observer_elapsed (cairo_device_t *abstract_device) cairo_device_observer_t *device; if (unlikely (CAIRO_REFERENCE_COUNT_IS_INVALID (&abstract_device->ref_count))) - return; + return -1; if (! _cairo_device_is_observer (abstract_device)) - return; + return -1; device = (cairo_device_observer_t *) abstract_device; return _cairo_observation_total_elapsed_ns (&device->log); -- cgit v1.2.3