Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/amrctl avoid calling printf() %s with NULL.
details: https://anonhg.NetBSD.org/src/rev/f2cbed7b71dc
branches: trunk
changeset: 954541:f2cbed7b71dc
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Sep 06 02:34:02 2020 +0000
description:
avoid calling printf() %s with NULL.
diffstat:
sbin/amrctl/amrctl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 83d1eea57dab -r f2cbed7b71dc sbin/amrctl/amrctl.c
--- a/sbin/amrctl/amrctl.c Sun Sep 06 02:25:13 2020 +0000
+++ b/sbin/amrctl/amrctl.c Sun Sep 06 02:34:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amrctl.c,v 1.11 2018/08/27 00:36:03 sevan Exp $ */
+/* $NetBSD: amrctl.c,v 1.12 2020/09/06 02:34:02 mrg Exp $ */
/*-
* Copyright (c) 2002, Pierre David <Pierre.David%crc.u-strasbg.fr@localhost>
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: amrctl.c,v 1.11 2018/08/27 00:36:03 sevan Exp $");
+__RCSID("$NetBSD: amrctl.c,v 1.12 2020/09/06 02:34:02 mrg Exp $");
#endif
#include <stdio.h>
@@ -453,7 +453,8 @@
printf("Logical volume %d\t", ldrv);
statestr = describe_state(verbosity, state);
- printf("%s ", statestr);
+ if (statestr)
+ printf("%s ", statestr);
printf("(%.2f GB, RAID%d", szgb, raid_level);
if (verbosity >= 1) {
describe_property(prop, propstr);
Home |
Main Index |
Thread Index |
Old Index