Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pkg_install/add don't pass null pointers to printf ...



details:   https://anonhg.NetBSD.org/src/rev/a4d6c1c785bb
branches:  trunk
changeset: 533758:a4d6c1c785bb
user:      yamt <yamt%NetBSD.org@localhost>
date:      Tue Jul 09 04:35:30 2002 +0000

description:
don't pass null pointers to printf for "%s".

diffstat:

 usr.sbin/pkg_install/add/perform.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r d5345b6f4ee7 -r a4d6c1c785bb usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c        Tue Jul 09 03:30:05 2002 +0000
+++ b/usr.sbin/pkg_install/add/perform.c        Tue Jul 09 04:35:30 2002 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: perform.c,v 1.66 2002/06/10 09:14:26 yamt Exp $        */
+/*     $NetBSD: perform.c,v 1.67 2002/07/09 04:35:30 yamt Exp $        */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.66 2002/06/10 09:14:26 yamt Exp $");
+__RCSID("$NetBSD: perform.c,v 1.67 2002/07/09 04:35:30 yamt Exp $");
 #endif
 #endif
 
@@ -91,7 +91,7 @@
                }
                if (cp == NULL) {
                        warnx("<%s> (1) add of dependency `%s' failed%s",
-                           pkg, name, Force ? " (proceeding anyway)" : "!");
+                           pkg ? pkg : "stdin", name, Force ? " (proceeding anyway)" : "!");
                        if (!Force)
                                ++errc;
                } else {
@@ -159,7 +159,7 @@
                                                Prefix ? Prefix : "",
                                        Verbose ? "-v " : "")) {
                                        warnx("<%s> (2) add of dependency `%s' failed%s",
-                                             pkg, name, Force ? " (proceeding anyway)" : "!");
+                                             pkg ? pkg : "stdin", name, Force ? " (proceeding anyway)" : "!");
                                        if (!Force)
                                                ++errc;
                                } else {



Home | Main Index | Thread Index | Old Index