mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dix: replace CLIENT_ID() macro by dixClientIdForXID() inline function
Make it type-safe and a bit more obvious what it really does, also adding some inline documentation. Since it's just some bit shifting magic, it's qualified for inlining. The CLIENT_ID() macro isn't used by any external modules, so the new function doesn't need to be in a public header. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -87,6 +87,7 @@ Author: Adobe Systems Incorporated
|
||||
|
||||
#include "dix/callback_priv.h"
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/resource_priv.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "windowstr.h"
|
||||
@@ -221,7 +222,7 @@ int
|
||||
dixLookupResourceOwner(ClientPtr *result, XID id, ClientPtr client, Mask access_mode)
|
||||
{
|
||||
void *pRes;
|
||||
int rc = BadValue, clientIndex = CLIENT_ID(id);
|
||||
int rc = BadValue, clientIndex = dixClientIdForXID(id);
|
||||
|
||||
if (!clientIndex || !clients[clientIndex] || (id & SERVER_BIT))
|
||||
goto bad;
|
||||
|
||||
Reference in New Issue
Block a user