Eliminate boilerplate around client->noClientException.

Just let Dispatch() check for a noClientException, rather than making
every single dispatch procedure take care of it.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Jamey Sharp 2010-05-10 20:22:05 -07:00
commit 92ed75ac59
52 changed files with 475 additions and 621 deletions

View file

@ -78,7 +78,7 @@ ProcSELinuxQueryVersion(ClientPtr client)
swaps(&rep.server_minor, n);
}
WriteToClient(client, sizeof(rep), (char *)&rep);
return (client->noClientException);
return Success;
}
static int
@ -109,7 +109,7 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
WriteToClient(client, len, ctx);
freecon(ctx);
return client->noClientException;
return Success;
}
static int
@ -390,7 +390,7 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
WriteToClient(client, size * 4, (char *)buf);
/* Free stuff and return */
rc = client->noClientException;
rc = Success;
free(buf);
out:
SELinuxFreeItems(items, count);