summaryrefslogtreecommitdiff
path: root/src/cairo-surface-observer.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-08-30 15:17:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-08-30 15:17:41 +0100
commit7df796433357ec1bb9e448406ded9ba48c6d839f (patch)
tree1e168bc360f4c8c111d720e6d7a2d419da19f9c4 /src/cairo-surface-observer.c
parent70cd3b473d09e9ad3d803014a904a22639db1a24 (diff)
observer: Add missing return codes
Upon detecting the user error, supply an error code! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-surface-observer.c')
-rw-r--r--src/cairo-surface-observer.c8
1 files changed, 4 insertions, 4 deletions
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);