diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-24 19:45:10 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-07-18 09:04:24 +0300 |
commit | 1a3a3bd4960cef8c34aa04b4daa125a5efc415f3 (patch) | |
tree | 2dab5e55c63228065d1f044d721ecb3747c6c405 /usr/src | |
parent | c59d9dff034f6cf5330aceb38bb1757d01e3904e (diff) | |
download | illumos-joyent-1a3a3bd4960cef8c34aa04b4daa125a5efc415f3.tar.gz |
11383 listen: NULL pointer errors
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/listen/lsdbf.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/usr/src/cmd/listen/lsdbf.c b/usr/src/cmd/listen/lsdbf.c index 56efe2ec6c..5983b020a0 100644 --- a/usr/src/cmd/listen/lsdbf.c +++ b/usr/src/cmd/listen/lsdbf.c @@ -29,8 +29,6 @@ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * data base routines for the network listener process */ @@ -532,7 +530,7 @@ int mflag; DEBUG((9,"scan_line failed svc_code strchr")); return(0); } - *p = NULL; + *p = '\0'; *svc_code_p = bp; nexttok = ++p; @@ -540,7 +538,7 @@ int mflag; DEBUG((9,"scan_line failed flags strchr")); return(0); } - *p = NULL; + *p = '\0'; while (*nexttok) { switch (*nexttok) { @@ -564,7 +562,7 @@ int mflag; DEBUG((9,"scan_line failed id strchr")); return(0); } - *p = NULL; + *p = '\0'; *id_p = nexttok; nexttok = ++p; @@ -572,7 +570,7 @@ int mflag; DEBUG((9,"scan_line failed res1 strchr")); return(0); } - *p = NULL; + *p = '\0'; *res1_p = nexttok; nexttok = ++p; @@ -580,7 +578,7 @@ int mflag; DEBUG((9,"scan_line failed res2 strchr")); return(0); } - *p = NULL; + *p = '\0'; *res2_p = nexttok; nexttok = ++p; @@ -588,7 +586,7 @@ int mflag; DEBUG((9,"scan_line failed res3 strchr")); return(0); } - *p = NULL; + *p = '\0'; *res3_p = nexttok; nexttok = ++p; @@ -596,7 +594,7 @@ int mflag; DEBUG((9,"scan_line failed private strchr")); return(0); } - *p = NULL; + *p = '\0'; *private_p = nexttok; nexttok = ++p; @@ -604,7 +602,7 @@ int mflag; DEBUG((9,"scan_line failed rpc strchr")); return(0); } - *p = NULL; + *p = '\0'; *prognum = -1; *vernum = -1; @@ -658,7 +656,7 @@ int mflag; DEBUG((9,"scan_line failed sflags strchr")); return(0); } - *p = NULL; + *p = '\0'; *sflags = 0; while (*nexttok) { @@ -698,7 +696,7 @@ int mflag; DEBUG((9,"scan_line failed module strchr")); return(0); } - *p = NULL; + *p = '\0'; *module_p = nexttok; nexttok = ++p; @@ -914,7 +912,7 @@ register char *mp; extern int errno; DEBUG((9,"in pushmod:")); - if (!mp || *mp == NULL) { + if (!mp || *mp == '\0') { DEBUG((9,"NULL list: exiting pushmod")); return(0); } |