replace some (type *)0 to NULL
authorchl <chl@openbsd.org>
Sun, 18 May 2014 05:08:07 +0000 (05:08 +0000)
committerchl <chl@openbsd.org>
Sun, 18 May 2014 05:08:07 +0000 (05:08 +0000)
ok krw@ millert@

usr.sbin/edquota/edquota.c

index 00c83da..e5ff38c 100644 (file)
@@ -242,7 +242,7 @@ getprivs(u_int id, int quotatype)
        size_t qfpathnamelen;
 
        setfsent();
-       quphead = (struct quotause *)0;
+       quphead = NULL;
        qcmd = QCMD(Q_GETQUOTA, quotatype);
        while ((fs = getfsent())) {
                if (strcmp(fs->fs_vfstype, "ffs") &&
@@ -310,7 +310,7 @@ getprivs(u_int id, int quotatype)
                else
                        quptail->next = qup;
                quptail = qup;
-               qup->next = 0;
+               qup->next = NULL;
        }
        endfsent();
        return(quphead);
@@ -450,7 +450,7 @@ readprivs(struct quotause *quplist, int infd)
                        warnx("%s: bad format", line1);
                        return(0);
                }
-               if ((cp = strtok((char *)0, "\n")) == NULL) {
+               if ((cp = strtok(NULL, "\n")) == NULL) {
                        warnx("%s: %s: bad format", fsp, &fsp[strlen(fsp) + 1]);
                        return(0);
                }
@@ -587,7 +587,7 @@ readtimes(struct quotause *quplist, int infd)
                        warnx("%s: bad format", line1);
                        return(0);
                }
-               if ((cp = strtok((char *)0, "\n")) == NULL) {
+               if ((cp = strtok(NULL, "\n")) == NULL) {
                        warnx("%s: %s: bad format", fsp,
                            &fsp[strlen(fsp) + 1]);
                        return(0);