summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/xres.c10
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;
}