From 3c157fd7695cd9c226439be6767f10a452e1b6cc Mon Sep 17 00:00:00 2001 From: Dima Dorfman Date: Sun, 22 Apr 2001 03:00:09 +0000 Subject: Don't pass NULL to the %s format. Reviewed by: kris --- libutil/pw_util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libutil/pw_util.c') 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"); -- cgit v1.2.3-56-ge451