diff options
author | Adam Jackson <ajax@redhat.com> | 2007-12-23 14:27:14 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2007-12-23 14:27:14 -0500 |
commit | 743008a4812d6b046211ebcf4eab202687b458d5 (patch) | |
tree | 1702cdf41c9449ea8aff6a67c096fd0479e0aed4 /Xext/xres.c | |
parent | beb29c605b8c66e1a18b89668aa421c1519645f6 (diff) |
Report serverClient resources in the X-Resource extension.
Diffstat (limited to 'Xext/xres.c')
-rw-r--r-- | Xext/xres.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Xext/xres.c b/Xext/xres.c index feadad27e..9bd70c672 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -67,7 +67,7 @@ ProcXResQueryClients (ClientPtr client) current_clients = xalloc((currentMaxClients - 1) * sizeof(int)); num_clients = 0; - for(i = 1; i < currentMaxClients; i++) { + for(i = 0; i < currentMaxClients; i++) { if(clients[i]) { current_clients[num_clients] = i; num_clients++; @@ -128,9 +128,7 @@ ProcXResQueryClientResources (ClientPtr client) clientID = CLIENT_ID(stuff->xid); - /* we could remove the (clientID == 0) check if we wanted to allow - probing the X-server's resource usage */ - if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + if((clientID >= currentMaxClients) || !clients[clientID]) { client->errorValue = stuff->xid; return BadValue; } @@ -254,9 +252,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) clientID = CLIENT_ID(stuff->xid); - /* we could remove the (clientID == 0) check if we wanted to allow - probing the X-server's resource usage */ - if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + if((clientID >= currentMaxClients) || !clients[clientID]) { client->errorValue = stuff->xid; return BadValue; } |