diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-04-24 23:56:36 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-05-19 12:32:48 -0700 |
commit | c38552d115e3bc71ad6179a8ad0d68778e943793 (patch) | |
tree | af6a02d6e34896c2a91b49ba568dab6bbad8b7d8 /Xext/shm.c | |
parent | e291c561821ae86b7dd74269d5cd29bc31703962 (diff) |
Add typed resource-lookup errors for non-core resource types.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'Xext/shm.c')
-rw-r--r-- | Xext/shm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Xext/shm.c b/Xext/shm.c index b2c42083e..3d9c63352 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -156,7 +156,7 @@ static ShmFuncs fbFuncs = {fbShmCreatePixmap, NULL}; rc = dixLookupResourceByType((pointer *)&(shmdesc), shmseg, ShmSegType, \ client, DixReadAccess); \ if (rc != Success) \ - return (rc == BadValue) ? BadShmSegCode : rc; \ + return rc; \ } #define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \ @@ -286,6 +286,7 @@ ShmExtensionInit(INITARGS) ShmReqCode = (unsigned char)extEntry->base; ShmCompletionCode = extEntry->eventBase; BadShmSegCode = extEntry->errorBase; + SetResourceTypeErrorValue(ShmSegType, BadShmSegCode); EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; } } @@ -584,7 +585,7 @@ ProcPanoramiXShmPutImage(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; |