diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-26 19:45:55 +0200 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-02-04 13:39:11 -0500 |
commit | 332e84f52cdee3d0232bd5ac5306c42177959c96 (patch) | |
tree | 0a6d55d851541debed72b6dc1d96cef70f2545ac /usr/src/ucbcmd | |
parent | 632cbd96e544a0a21f1a1f7ca071b145f379215d (diff) | |
download | illumos-joyent-332e84f52cdee3d0232bd5ac5306c42177959c96.tar.gz |
10309 mkstr: NULL pointer errors
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/ucbcmd')
-rw-r--r-- | usr/src/ucbcmd/mkstr/mkstr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/src/ucbcmd/mkstr/mkstr.c b/usr/src/ucbcmd/mkstr/mkstr.c index 7dfbdbf0f2..80c4015032 100644 --- a/usr/src/ucbcmd/mkstr/mkstr.c +++ b/usr/src/ucbcmd/mkstr/mkstr.c @@ -25,8 +25,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * mkstr - create a string error message file by massaging C source * @@ -237,7 +235,7 @@ copystr(void) } out: *cp = 0; - (void) printf("%d", hashit(buf, 1, NULL)); + (void) printf("%d", hashit(buf, 1, 0)); } static int @@ -254,7 +252,7 @@ inithash(void) int mesgpt = 0; rewind(mesgread); - while (fgetNUL(buf, sizeof (buf), mesgread) != NULL) { + while (fgetNUL(buf, sizeof (buf), mesgread) != 0) { (void) hashit(buf, 0, mesgpt); mesgpt += strlen(buf) + 2; } @@ -315,5 +313,5 @@ fgetNUL(char *obuf, int rmdr, FILE *file) *buf++ = c; *buf++ = 0; (void) getc(file); - return ((feof(file) || ferror(file)) ? NULL : 1); + return ((feof(file) || ferror(file)) ? 0 : 1); } |