Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Revert previous, fix iteration loops to be ...
details: https://anonhg.NetBSD.org/src/rev/03dd91bb6f22
branches: trunk
changeset: 320159:03dd91bb6f22
user: christos <christos%NetBSD.org@localhost>
date: Sun Jun 24 19:53:35 2018 +0000
description:
Revert previous, fix iteration loops to be consistent:
All sets that have an id >= SET_LAST have NULL name, so use that like the
loop just below.
diffstat:
usr.sbin/sysinst/util.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r 83abbb2f4a03 -r 03dd91bb6f22 usr.sbin/sysinst/util.c
--- a/usr.sbin/sysinst/util.c Sun Jun 24 19:48:46 2018 +0000
+++ b/usr.sbin/sysinst/util.c Sun Jun 24 19:53:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.10 2018/06/23 22:35:29 kamil Exp $ */
+/* $NetBSD: util.c,v 1.11 2018/06/24 19:53:35 christos Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -78,7 +78,7 @@
static const char *msg_cur_distsets_row;
static int select_menu_width;
-static uint8_t set_status[SET_GROUP_END + 1];
+static uint8_t set_status[SET_GROUP_END];
#define SET_VALID 0x01
#define SET_SELECTED 0x02
#define SET_SKIPPED 0x04
@@ -1010,16 +1010,15 @@
/* Accurately count selected sets */
for (dist = dist_list; (set = dist->set) != SET_LAST; dist++) {
+ if (dist->name == NULL)
+ continue;
if ((set_status[set] & (SET_VALID | SET_SELECTED))
== (SET_VALID | SET_SELECTED))
tarstats.nselected++;
}
status = SET_RETRY;
- for (dist = dist_list; ; dist++) {
- set = dist->set;
- if (set == SET_LAST)
- break;
+ for (dist = dist_list; (set = dist->set) != SET_LAST; dist++) {
if (dist->name == NULL)
continue;
if (set_status[set] != (SET_VALID | SET_SELECTED))
Home |
Main Index |
Thread Index |
Old Index