diff options
author | Dima Dorfman <dd@FreeBSD.org> | 2001-04-22 03:00:09 +0000 |
---|---|---|
committer | Dima Dorfman <dd@FreeBSD.org> | 2001-04-22 03:00:09 +0000 |
commit | 3c157fd7695cd9c226439be6767f10a452e1b6cc (patch) | |
tree | c30f36a05b59aa35d8b7844d06a28ebf88a057db /libutil | |
parent | 45a2cd95a357dec3d1fb614593c239432e36ca57 (diff) | |
download | pw-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.c | 8 |
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"); |