Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Cleanup setroot() a bit:
details: https://anonhg.NetBSD.org/src/rev/a50bf48ff464
branches: trunk
changeset: 481239:a50bf48ff464
user: enami <enami%NetBSD.org@localhost>
date: Tue Jan 25 03:42:36 2000 +0000
description:
Cleanup setroot() a bit:
- No longer necessary to use goto, just breaking the loop like other case
is enough.
- Don't caliculate loop invariant every time. Just reuse.
diffstat:
sys/kern/kern_subr.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (35 lines):
diff -r 3388f65ea2bf -r a50bf48ff464 sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c Tue Jan 25 03:32:36 2000 +0000
+++ b/sys/kern/kern_subr.c Tue Jan 25 03:42:36 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_subr.c,v 1.53 2000/01/25 01:15:14 fvdl Exp $ */
+/* $NetBSD: kern_subr.c,v 1.54 2000/01/25 03:42:36 enami Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -666,15 +666,12 @@
ndumpdev = MAKEDISKDEV(major(nrootdev),
DISKUNIT(nrootdev), 1);
}
- if (rootdv->dv_class == DV_IFNET)
- dumpdv = NULL;
- else
- dumpdv = rootdv;
+ dumpdv = defdumpdv;
break;
}
if (len == 4 && strcmp(buf, "none") == 0) {
dumpspec = "none";
- goto havedump;
+ break;
}
dv = getdisk(buf, len, 1, &ndumpdev, 1);
if (dv) {
@@ -683,7 +680,6 @@
}
}
- havedump:
rootdev = nrootdev;
dumpdev = ndumpdev;
Home |
Main Index |
Thread Index |
Old Index