Source-Changes-HG archive

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

[src/trunk]: src/sbin/raidctl avoid trying to printf() a NULL as %s. fixes l...



details:   https://anonhg.NetBSD.org/src/rev/0bc1d9e7715e
branches:  trunk
changeset: 943557:0bc1d9e7715e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Sep 06 05:31:46 2020 +0000

description:
avoid trying to printf() a NULL as %s.  fixes likely bug.

diffstat:

 sbin/raidctl/rf_configure.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r be3b9580e54f -r 0bc1d9e7715e sbin/raidctl/rf_configure.c
--- a/sbin/raidctl/rf_configure.c       Sun Sep 06 05:30:17 2020 +0000
+++ b/sbin/raidctl/rf_configure.c       Sun Sep 06 05:31:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_configure.c,v 1.33 2018/01/18 00:32:49 mrg Exp $ */
+/*     $NetBSD: rf_configure.c,v 1.34 2020/09/06 05:31:46 mrg Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: rf_configure.c,v 1.33 2018/01/18 00:32:49 mrg Exp $");
+__RCSID("$NetBSD: rf_configure.c,v 1.34 2020/09/06 05:31:46 mrg Exp $");
 #endif
 
 
@@ -286,7 +286,7 @@
                b = getfsspecname(b1, sizeof(b1), buf);
                if (b == NULL) {
                        warnx("Config file error: warning: unable to get "
-                           "device file for spare disk %d: %s", c, b);
+                           "device file for spare disk %d: %s", c, buf);
                        b = buf;
                }
 



Home | Main Index | Thread Index | Old Index