summaryrefslogtreecommitdiffstats
path: root/bin/ls
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-07-10 20:44:55 +0000
committerdillon <dillon@FreeBSD.org>2002-07-10 20:44:55 +0000
commit3adf63f81dde1ef0bfe13d1926aecb7453b2cfec (patch)
tree532d4c0413a4d4d483da0b70f7b88f1fad49506d /bin/ls
parentd5291af616cd93f5d0f49512296098b8f3ed246b (diff)
downloadFreeBSD-src-3adf63f81dde1ef0bfe13d1926aecb7453b2cfec.zip
FreeBSD-src-3adf63f81dde1ef0bfe13d1926aecb7453b2cfec.tar.gz
err() is documented as allowing NULL for the format string but GCC isn't
happy about it any more so change the usage to make buildworld work again.
Diffstat (limited to 'bin/ls')
-rw-r--r--bin/ls/lomac.c4
-rw-r--r--bin/ls/ls.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/ls/lomac.c b/bin/ls/lomac.c
index ff3b0bf..e1462e0 100644
--- a/bin/ls/lomac.c
+++ b/bin/ls/lomac.c
@@ -141,7 +141,7 @@ get_lattr(FTSENT *ent)
} else
strncpy(ioctl_args.path, ent->fts_accpath, MAXPATHLEN - 1);
if (ioctl(devlomac, LIOGETFLATTR, &ioctl_args) == -1)
- err(1, NULL);
+ err(1, "ioctl");
/* we use ioctl_args.path as scratch space to build lattr */
if (ioctl_args.flags != 0)
@@ -150,6 +150,6 @@ get_lattr(FTSENT *ent)
asprintf(&lattr, "%d", ioctl_args.level);
if (lattr == NULL)
- err(1, NULL);
+ err(1, "lattr");
return (lattr);
}
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index fb6eb1e..7dd0266 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -438,7 +438,7 @@ traverse(int argc, char *argv[], int options)
if ((ftsp =
fts_open(argv, options, f_nosort ? NULL : mastercmp)) == NULL)
- err(1, NULL);
+ err(1, "fts_open");
display(NULL, fts_children(ftsp, 0));
if (f_listdir)
@@ -539,7 +539,7 @@ display(FTSENT *p, FTSENT *list)
/* Fill-in "::" as "0:0:0" for the sake of scanf. */
jinitmax = initmax2 = malloc(strlen(initmax) * 2 + 2);
if (jinitmax == NULL)
- err(1, NULL);
+ err(1, "malloc");
if (*initmax == ':')
strcpy(initmax2, "0:"), initmax2 += 2;
else
@@ -675,7 +675,7 @@ display(FTSENT *p, FTSENT *list)
flags = strdup("-");
}
if (flags == NULL)
- err(1, NULL);
+ err(1, "fflagstostr");
flen = strlen(flags);
if (flen > (size_t)maxflags)
maxflags = flen;
@@ -692,7 +692,7 @@ display(FTSENT *p, FTSENT *list)
if ((np = malloc(sizeof(NAMES) + lattrlen +
ulen + glen + flen + 4)) == NULL)
- err(1, NULL);
+ err(1, "malloc");
np->user = &np->data[0];
(void)strcpy(np->user, user);
OpenPOWER on IntegriCloud