From 240e4713255e51018ccf90ef50bd8fa296dc5ffa Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 16 Jul 2025 12:06:12 +0200 Subject: [PATCH] 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 --- os/client.c | 12 ++++++------ os/connection.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/os/client.c b/os/client.c index c844eb6d8..44d2a070a 100644 --- a/os/client.c +++ b/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) diff --git a/os/connection.c b/os/connection.c index 9864c6142..c82704720 100644 --- a/os/connection.c +++ b/os/connection.c @@ -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,