diff options
author | dd <dd@FreeBSD.org> | 2001-04-22 03:00:09 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-04-22 03:00:09 +0000 |
commit | d3657cb5d2b77d722e04d861c9a973d5e3dbd1c8 (patch) | |
tree | ba5097e6e0dd5cce7a90dc2f568733c2861ea6cd | |
parent | 95ccde8ac80f0b9dbac5ee894f1a5c00d38477f8 (diff) | |
download | FreeBSD-src-d3657cb5d2b77d722e04d861c9a973d5e3dbd1c8.zip FreeBSD-src-d3657cb5d2b77d722e04d861c9a973d5e3dbd1c8.tar.gz |
Don't pass NULL to the %s format.
Reviewed by: kris
-rw-r--r-- | lib/libutil/pw_util.c | 8 | ||||
-rw-r--r-- | usr.sbin/vipw/pw_util.c | 8 |
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"); |