diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2008-08-09 19:47:19 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2008-08-09 19:47:19 +0000 |
commit | f422e90330b3d9b9d3300acf02661d9c5112458b (patch) | |
tree | b326ca0f0931dce54abeb2e72d4b1f9c74628792 /sys/crypto/via | |
parent | a05071e8039b70945ad93a2a1d1e044be241e0ee (diff) | |
download | src-f422e90330b3d9b9d3300acf02661d9c5112458b.tar.gz src-f422e90330b3d9b9d3300acf02661d9c5112458b.zip |
Implify sessions freeing loop.
Notes
Notes:
svn path=/head/; revision=181476
Diffstat (limited to 'sys/crypto/via')
-rw-r--r-- | sys/crypto/via/padlock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c index 11f74a2c43e2..a1d2da8cf470 100644 --- a/sys/crypto/via/padlock.c +++ b/sys/crypto/via/padlock.c @@ -152,8 +152,7 @@ padlock_detach(device_t dev) return (EBUSY); } } - for (ses = TAILQ_FIRST(&sc->sc_sessions); ses != NULL; - ses = TAILQ_FIRST(&sc->sc_sessions)) { + while ((ses = TAILQ_FIRST(&sc->sc_sessions)) != NULL) { TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next); free(ses, M_PADLOCK); } |