Use ascii null char ('\0') instead of NULL.

Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
This commit is contained in:
Yoshihiro Takahashi 2004-03-05 13:58:40 +00:00
parent 1bcf24ee9d
commit eaeb087233

View File

@ -197,7 +197,7 @@ main(int argc, char *argv[])
break; break;
case 's': case 's':
secsize = strtol(optarg, &endptr, 0); secsize = strtol(optarg, &endptr, 0);
if (errno || *optarg == NULL || *endptr) if (errno || *optarg == '\0' || *endptr)
errx(1, "%s: Bad argument to -s option", errx(1, "%s: Bad argument to -s option",
optarg); optarg);
switch (secsize) { switch (secsize) {
@ -214,7 +214,7 @@ main(int argc, char *argv[])
case 'v': case 'v':
v_flag = 1; v_flag = 1;
version = strtol(optarg, &endptr, 0); version = strtol(optarg, &endptr, 0);
if (errno || *optarg == NULL || *endptr || if (errno || *optarg == '\0' || *endptr ||
version < 0 || version > 255) version < 0 || version > 255)
errx(1, "%s: Bad argument to -s option", errx(1, "%s: Bad argument to -s option",
optarg); optarg);