summaryrefslogtreecommitdiffstats
path: root/bin
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
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')
-rw-r--r--bin/cp/cp.c2
-rw-r--r--bin/ls/lomac.c4
-rw-r--r--bin/ls/ls.c8
-rw-r--r--bin/ps/lomac.c2
-rw-r--r--bin/rcp/rcp.c8
-rw-r--r--bin/rm/rm.c4
6 files changed, 14 insertions, 14 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index ba79018..2e17f75 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -267,7 +267,7 @@ copy(char *argv[], enum op type, int fts_options)
umask(~mask);
if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL)
- err(1, NULL);
+ err(1, "fts_open");
for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) {
switch (curr->fts_info) {
case FTS_NS:
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);
diff --git a/bin/ps/lomac.c b/bin/ps/lomac.c
index f651955..ec05d1a 100644
--- a/bin/ps/lomac.c
+++ b/bin/ps/lomac.c
@@ -113,6 +113,6 @@ get_lattr(int pid)
if (devlomac == -1)
lomac_start();
if (ioctl(devlomac, LIOGETPLEVEL, &pid) == -1)
- err(1, NULL);
+ err(1, "ioctl");
return (pid);
}
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index f36af01..eb74580 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -307,7 +307,7 @@ toremote(char *targ, int argc, char *argv[])
strlen(src) + (tuser ? strlen(tuser) : 0) +
strlen(thost) + strlen(targ) + CMDNEEDS + 20;
if (!(bp = malloc(len)))
- err(1, NULL);
+ err(1, "malloc");
if (host) {
*host++ = 0;
suser = argv[i];
@@ -334,7 +334,7 @@ toremote(char *targ, int argc, char *argv[])
if (rem == -1) {
len = strlen(targ) + CMDNEEDS + 20;
if (!(bp = malloc(len)))
- err(1, NULL);
+ err(1, "malloc");
(void)snprintf(bp, len, "%s -t %s", cmd, targ);
host = thost;
#ifdef KERBEROS
@@ -374,7 +374,7 @@ tolocal(int argc, char *argv[])
len = strlen(_PATH_CP) + strlen(argv[i]) +
strlen(argv[argc - 1]) + 20;
if (!(bp = malloc(len)))
- err(1, NULL);
+ err(1, "malloc");
(void)snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
iamrecursive ? " -PR" : "", pflag ? " -p" : "",
argv[i], argv[argc - 1]);
@@ -401,7 +401,7 @@ tolocal(int argc, char *argv[])
}
len = strlen(src) + CMDNEEDS + 20;
if ((bp = malloc(len)) == NULL)
- err(1, NULL);
+ err(1, "malloc");
(void)snprintf(bp, len, "%s -f %s", cmd, src);
rem =
#ifdef KERBEROS
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 3457454..4c79343 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -185,7 +185,7 @@ rm_tree(char **argv)
if (Wflag)
flags |= FTS_WHITEOUT;
if (!(fts = fts_open(argv, flags, NULL)))
- err(1, NULL);
+ err(1, "fts_open");
while ((p = fts_read(fts)) != NULL) {
switch (p->fts_info) {
case FTS_DNR:
@@ -436,7 +436,7 @@ check(char *path, char *name, struct stat *sp)
return (1);
strmode(sp->st_mode, modep);
if ((flagsp = fflagstostr(sp->st_flags)) == NULL)
- err(1, NULL);
+ err(1, "fflagstostr");
(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
modep + 1, modep[9] == ' ' ? "" : " ",
user_from_uid(sp->st_uid, 0),
OpenPOWER on IntegriCloud