Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/config if there are no locators or parent, don't ou...
details: https://anonhg.NetBSD.org/src/rev/3f4e993c1d2b
branches: trunk
changeset: 499350:3f4e993c1d2b
user: cgd <cgd%NetBSD.org@localhost>
date: Sat Nov 18 00:51:29 2000 +0000
description:
if there are no locators or parent, don't output those arrays. (Sometimes
you really want no devices whatsoever. In that case, you get unused
static var warnings from the compile.) Reviewed by sommerfeld.
diffstat:
usr.sbin/config/mkioconf.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 9135f6b78682 -r 3f4e993c1d2b usr.sbin/config/mkioconf.c
--- a/usr.sbin/config/mkioconf.c Fri Nov 17 23:18:53 2000 +0000
+++ b/usr.sbin/config/mkioconf.c Sat Nov 18 00:51:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkioconf.c,v 1.53 2000/10/02 19:48:35 cgd Exp $ */
+/* $NetBSD: mkioconf.c,v 1.54 2000/11/18 00:51:29 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -227,6 +227,9 @@
{
int i;
+ if (locators.used == 0)
+ return (0);
+
if (fprintf(fp, "\n/* locators */\n\
static int loc[%d] = {", locators.used) < 0)
return (1);
@@ -247,6 +250,9 @@
{
int i;
+ if (parents.used == 0)
+ return (0);
+
if (fprintf(fp, "\n/* parent vectors */\n\
static short pv[%d] = {", parents.used) < 0)
return (1);
Home |
Main Index |
Thread Index |
Old Index