summaryrefslogtreecommitdiff
path: root/Xext/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/shm.c')
-rw-r--r--Xext/shm.c5
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;