summaryrefslogtreecommitdiffstats
path: root/libutil
diff options
context:
space:
mode:
authorDima Dorfman <dd@FreeBSD.org>2001-04-22 03:00:09 +0000
committerDima Dorfman <dd@FreeBSD.org>2001-04-22 03:00:09 +0000
commit3c157fd7695cd9c226439be6767f10a452e1b6cc (patch)
treec30f36a05b59aa35d8b7844d06a28ebf88a057db /libutil
parent45a2cd95a357dec3d1fb614593c239432e36ca57 (diff)
downloadpw-darwin-3c157fd7695cd9c226439be6767f10a452e1b6cc.tar.gz
pw-darwin-3c157fd7695cd9c226439be6767f10a452e1b6cc.tar.zst
pw-darwin-3c157fd7695cd9c226439be6767f10a452e1b6cc.zip
Don't pass NULL to the %s format.
Reviewed by: kris
Diffstat (limited to 'libutil')
-rw-r--r--libutil/pw_util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c
index fe99d71..c6c70ff 100644
--- a/libutil/pw_util.c
+++ b/libutil/pw_util.c
@@ -249,8 +249,12 @@ pw_error(name, err, eval)
#ifdef YP
extern int _use_yp;
#endif /* YP */
- if (err)
- warn("%s", name);
+ if (err) {
+ if (name != NULL)
+ warn("%s", name);
+ else
+ warn(NULL);
+ }
#ifdef YP
if (_use_yp)
warnx("NIS information unchanged");