From c38552d115e3bc71ad6179a8ad0d68778e943793 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sat, 24 Apr 2010 23:56:36 -0700 Subject: Add typed resource-lookup errors for non-core resource types. Signed-off-by: Jamey Sharp Reviewed-by: Adam Jackson --- dbe/dbe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dbe') diff --git a/dbe/dbe.c b/dbe/dbe.c index a49a46d69..fba10d689 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -422,12 +422,12 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) dbeWindowPrivResType, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; + return rc; rc = dixLookupResourceByType(&val, stuff->buffer, dbeDrawableResType, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; + return rc; /* Make sure that the id is valid for the window. * This is paranoid code since we already looked up the ID by type @@ -1672,6 +1672,8 @@ DbeExtensionInit(void) DbeResetProc, StandardMinorOpcode); dbeErrorBase = extEntry->errorBase; + SetResourceTypeErrorValue(dbeWindowPrivResType, dbeErrorBase + DbeBadBuffer); + SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer); } /* DbeExtensionInit() */ -- cgit v1.2.3