summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libutil/pw_util.c8
-rw-r--r--usr.sbin/vipw/pw_util.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
index fe99d71..c6c70ffb 100644
--- a/lib/libutil/pw_util.c
+++ b/lib/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");
diff --git a/usr.sbin/vipw/pw_util.c b/usr.sbin/vipw/pw_util.c
index fe99d71..c6c70ffb 100644
--- a/usr.sbin/vipw/pw_util.c
+++ b/usr.sbin/vipw/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");
OpenPOWER on IntegriCloud