Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/installboot/arch When printing the list of valid co...
details: https://anonhg.NetBSD.org/src/rev/26f524f1b214
branches: trunk
changeset: 778599:26f524f1b214
user: gson <gson%NetBSD.org@localhost>
date: Fri Apr 06 10:10:11 2012 +0000
description:
When printing the list of valid console names, don't treat the consoles[]
array as NULL terminated, because it's not.
diffstat:
usr.sbin/installboot/arch/i386.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 8b9b8512aa4b -r 26f524f1b214 usr.sbin/installboot/arch/i386.c
--- a/usr.sbin/installboot/arch/i386.c Fri Apr 06 09:44:44 2012 +0000
+++ b/usr.sbin/installboot/arch/i386.c Fri Apr 06 10:10:11 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386.c,v 1.38 2012/03/10 18:42:18 dsl Exp $ */
+/* $NetBSD: i386.c,v 1.39 2012/04/06 10:10:11 gson Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(__lint)
-__RCSID("$NetBSD: i386.c,v 1.38 2012/03/10 18:42:18 dsl Exp $");
+__RCSID("$NetBSD: i386.c,v 1.39 2012/04/06 10:10:11 gson Exp $");
#endif /* !__lint */
#include <sys/param.h>
@@ -251,7 +251,7 @@
if (i == __arraycount(consoles)) {
warnx("invalid console name, valid names are:");
(void)fprintf(stderr, "\t%s", consoles[0].name);
- for (i = 1; consoles[i].name != NULL; i++)
+ for (i = 1; i < __arraycount(consoles); i++)
(void)fprintf(stderr, ", %s", consoles[i].name);
(void)fprintf(stderr, "\n");
return 1;
Home |
Main Index |
Thread Index |
Old Index