From e291c561821ae86b7dd74269d5cd29bc31703962 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sat, 24 Apr 2010 23:26:40 -0700 Subject: Return an appropriately-typed error from dixLookupResourceByType. Rather than always returning BadValue, associate an error status like BadWindow with a resource type like RT_WINDOW, and return the appropriate one for the requested type. This patch only touches the core protocol resource types. Others still return BadValue and need to be mapped appropriately. dixLookupResourceByType can now return BadImplementation, if the caller asked for a resource type that has not been allocated in the server. Signed-off-by: Jamey Sharp Reviewed-by: Adam Jackson --- render/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'render/render.c') diff --git a/render/render.c b/render/render.c index 9aabcfb20..fc6dbb1f2 100644 --- a/render/render.c +++ b/render/render.c @@ -1856,7 +1856,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) if (ret != Success) { free(cursors); - return (ret == BadValue) ? BadCursor : ret; + return ret; } deltas[i] = elt->delay; elt++; -- cgit v1.2.3