mirror of
https://github.com/X11Libre/xserver.git
synced 2026-01-26 14:03:17 +00:00
os: use NULL instead of NullClient
No need to have another name for NULL, we can use NULL directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
236e8e4656
commit
240e471325
12
os/client.c
12
os/client.c
@ -107,7 +107,7 @@ DetermineClientPid(struct _Client * client)
|
||||
LocalClientCredRec *lcc = NULL;
|
||||
pid_t pid = -1;
|
||||
|
||||
if (client == NullClient)
|
||||
if (client == NULL)
|
||||
return pid;
|
||||
|
||||
if (client == serverClient)
|
||||
@ -451,7 +451,7 @@ void
|
||||
ReserveClientIds(struct _Client *client)
|
||||
{
|
||||
#ifdef CLIENTIDS
|
||||
if (client == NullClient)
|
||||
if (client == NULL)
|
||||
return;
|
||||
|
||||
assert(!client->clientIds);
|
||||
@ -483,7 +483,7 @@ void
|
||||
ReleaseClientIds(struct _Client *client)
|
||||
{
|
||||
#ifdef CLIENTIDS
|
||||
if (client == NullClient)
|
||||
if (client == NULL)
|
||||
return;
|
||||
|
||||
if (!client->clientIds)
|
||||
@ -518,7 +518,7 @@ ReleaseClientIds(struct _Client *client)
|
||||
pid_t
|
||||
GetClientPid(struct _Client *client)
|
||||
{
|
||||
if (client == NullClient)
|
||||
if (client == NULL)
|
||||
return -1;
|
||||
|
||||
if (!client->clientIds)
|
||||
@ -544,7 +544,7 @@ GetClientPid(struct _Client *client)
|
||||
const char *
|
||||
GetClientCmdName(struct _Client *client)
|
||||
{
|
||||
if (client == NullClient)
|
||||
if (client == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!client->clientIds)
|
||||
@ -570,7 +570,7 @@ GetClientCmdName(struct _Client *client)
|
||||
const char *
|
||||
GetClientCmdArgs(struct _Client *client)
|
||||
{
|
||||
if (client == NullClient)
|
||||
if (client == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!client->clientIds)
|
||||
|
||||
@ -626,7 +626,7 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time)
|
||||
|
||||
OsCommPtr oc = calloc(1, sizeof(OsCommRec));
|
||||
if (!oc)
|
||||
return NullClient;
|
||||
return NULL;
|
||||
oc->trans_conn = trans_conn;
|
||||
oc->fd = fd;
|
||||
oc->input = (ConnectionInputPtr) NULL;
|
||||
@ -636,7 +636,7 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time)
|
||||
oc->flags = 0;
|
||||
if (!(client = NextAvailableClient((void *) oc))) {
|
||||
free(oc);
|
||||
return NullClient;
|
||||
return NULL;
|
||||
}
|
||||
client->local = ComputeLocalClient(client);
|
||||
ospoll_add(server_poll, fd,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user