diff options
author | 2015-07-29 12:58:16 +0000 | |
---|---|---|
committer | 2015-07-29 12:58:16 +0000 | |
commit | 4ab51bfe1be9bed595548d8faef92504c28f187a (patch) | |
tree | d3213724b418875180ca92eb0d5caaf53a46cb7e /sys/dev/softraid.c | |
parent | status_out and associated data structures are no longer used. (diff) | |
download | wireguard-openbsd-4ab51bfe1be9bed595548d8faef92504c28f187a.tar.xz wireguard-openbsd-4ab51bfe1be9bed595548d8faef92504c28f187a.zip |
Zap a SLIST in a more obviously correct/safe way.
Originally from pelikan@, recent prodding from bluhm@ and jsg@.
ok pelikan@ millert@ bluhm@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index c4517bcae6f..342d21a3a71 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.362 2015/07/28 15:42:23 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.363 2015/07/29 12:58:16 krw Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -267,8 +267,7 @@ sr_meta_attach(struct sr_discipline *sd, int chunk_no, int force) goto bad; /* Force chunks into correct order now that metadata is attached. */ - SLIST_FOREACH(ch_entry, cl, src_link) - SLIST_REMOVE(cl, ch_entry, sr_chunk, src_link); + SLIST_INIT(cl); for (i = 0; i < chunk_no; i++) { ch_entry = sd->sd_vol.sv_chunks[i]; chunk2 = NULL; |