diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-04-19 21:40:49 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-04-19 21:40:49 +0000 |
commit | ed2adfd3a1bbefbe61e05b69504fbbcbe9cd7d89 (patch) | |
tree | fc9617df2d76571126da8431a671eef553610b18 /sys/dev | |
parent | f34db6cb1631498913bf21a088324df9600954d7 (diff) |
Use variable 'cid' in for(;;) rather than 'i' with an assignment
'cid = i;' when break'ing. Makes code consistent with same search
later. No functional change and shrinks later functional diff.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/softraid.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 62a17ea4fac..ff335328265 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.369 2016/04/19 21:19:58 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.370 2016/04/19 21:40:48 krw Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -3014,15 +3014,13 @@ sr_hotspare_rebuild(struct sr_discipline *sd) * Attempt to locate a hotspare and initiate rebuild. */ - for (i = 0; i < sd->sd_meta->ssdi.ssd_chunk_no; i++) { - if (sd->sd_vol.sv_chunks[i]->src_meta.scm_status == + for (cid = 0; cid < sd->sd_meta->ssdi.ssd_chunk_no; cid++) { + if (sd->sd_vol.sv_chunks[cid]->src_meta.scm_status == BIOC_SDOFFLINE) { - cid = i; - chunk = sd->sd_vol.sv_chunks[i]; + chunk = sd->sd_vol.sv_chunks[cid]; break; } } - if (chunk == NULL) { printf("%s: no offline chunk found on %s!\n", DEVNAME(sc), sd->sd_meta->ssd_devname); |