Xi: sanitize ProcXIGetClientPointer.
This was quite old code and can be streamlined a bit. The new code is essentially the same as in ProcXISetClientPointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
96ea82fdac
commit
98e8ec8deb
17
Xi/getcptr.c
17
Xi/getcptr.c
|
@ -59,22 +59,21 @@ SProcXIGetClientPointer(ClientPtr client)
|
|||
|
||||
int ProcXIGetClientPointer(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
WindowPtr win;
|
||||
int rc;
|
||||
ClientPtr winclient;
|
||||
xXIGetClientPointerReply rep;
|
||||
REQUEST(xXIGetClientPointerReq);
|
||||
REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
|
||||
|
||||
err = dixLookupWindow(&win, stuff->win, client, DixReadAccess);
|
||||
if (err != Success)
|
||||
if (stuff->win != None)
|
||||
{
|
||||
SendErrorToClient(client, IReqCode, X_XIGetClientPointer,
|
||||
stuff->win, err);
|
||||
return Success;
|
||||
}
|
||||
rc = dixLookupClient(&winclient, stuff->win, client,
|
||||
DixWriteAccess);
|
||||
|
||||
winclient = wClient(win);
|
||||
if (rc != Success)
|
||||
return BadWindow;
|
||||
} else
|
||||
winclient = client;
|
||||
|
||||
rep.repType = X_Reply;
|
||||
rep.RepType = X_XIGetClientPointer;
|
||||
|
|
Loading…
Reference in New Issue
Block a user