From 58b3b7a40abd8f717c11ae6ddd0c695eb16a7181 Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 4 Oct 2000 08:38:09 +0000 Subject: [PATCH] plug warn() call with variable only, just in case - honor behavior of warn(NULL) --- usr.bin/chpass/pw_yp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.bin/chpass/pw_yp.c b/usr.bin/chpass/pw_yp.c index ea353c881524..563bca70377d 100644 --- a/usr.bin/chpass/pw_yp.c +++ b/usr.bin/chpass/pw_yp.c @@ -1,4 +1,4 @@ -/* $NetBSD: pw_yp.c,v 1.15 1999/08/16 03:02:46 simonb Exp $ */ +/* $NetBSD: pw_yp.c,v 1.16 2000/10/04 08:38:09 itojun Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93"; #else -__RCSID("$NetBSD: pw_yp.c,v 1.15 1999/08/16 03:02:46 simonb Exp $"); +__RCSID("$NetBSD: pw_yp.c,v 1.16 2000/10/04 08:38:09 itojun Exp $"); #endif #endif /* not lint */ @@ -317,8 +317,12 @@ yppw_error(name, err, eval) int err, eval; { - if (err) - warn(name); + if (err) { + if (name) + warn("%s", name); + else + warn(name); + } errx(eval, "YP passwd information unchanged"); }