diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-05 23:17:19 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-01-05 23:31:20 +0100 |
commit | 80b6d6b9cc456a943e307ec069c0c395c6ba650e (patch) | |
tree | f8fbbf51720409b25fe23e5bdbe1b1d7cafde918 /nx-X11 | |
parent | 1d50b2ab3bb8cd15316e492a11ad06c4230a429c (diff) | |
download | nx-libs-80b6d6b9cc456a943e307ec069c0c395c6ba650e.tar.gz nx-libs-80b6d6b9cc456a943e307ec069c0c395c6ba650e.tar.bz2 nx-libs-80b6d6b9cc456a943e307ec069c0c395c6ba650e.zip |
Error.c: simplify some NULL pointer checks
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Error.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c index 2e7a13067..ab8da2db4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Error.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c @@ -334,7 +334,7 @@ char *nxagentGetHomePath(void) char *homeEnv = getenv("NX_HOME"); - if (homeEnv == NULL || *homeEnv == '\0') + if (!homeEnv || *homeEnv == '\0') { #ifdef TEST fprintf(stderr, "%s: No environment for NX_HOME.\n", __func__); @@ -342,7 +342,7 @@ char *nxagentGetHomePath(void) homeEnv = getenv("HOME"); - if (homeEnv == NULL || *homeEnv == '\0') + if (!homeEnv || *homeEnv == '\0') { #ifdef PANIC fprintf(stderr, "%s: PANIC! No environment for HOME.\n", __func__); @@ -386,7 +386,7 @@ char *nxagentGetRootPath(void) char *rootEnv = getenv("NX_ROOT"); - if (rootEnv == NULL || *rootEnv == '\0') + if (!rootEnv || *rootEnv == '\0') { #ifdef TEST fprintf(stderr, "%s: WARNING! No environment for NX_ROOT.\n", __func__); @@ -399,7 +399,7 @@ char *nxagentGetRootPath(void) char *homeEnv = nxagentGetHomePath(); - if (homeEnv == NULL) + if (!homeEnv) { return NULL; } |