From 357a26abb1a92e8cb5b1e08fef228560ec08ebb9 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sun, 12 Jun 2011 23:33:08 +0000 Subject: [PATCH] Use swap32() right. Submitted by: gcopper MFC after: 2 weeks --- sys/dev/safe/safe.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c index ac970980449b..18ef5e5f8cfe 100644 --- a/sys/dev/safe/safe.c +++ b/sys/dev/safe/safe.c @@ -1580,9 +1580,12 @@ safe_callback(struct safe_softc *sc, struct safe_ringentry *re) * SHA-1 ICV's are byte-swapped; fix 'em up * before copy them to their destination. */ - bswap32(re->re_sastate.sa_saved_indigest[0]); - bswap32(re->re_sastate.sa_saved_indigest[1]); - bswap32(re->re_sastate.sa_saved_indigest[2]); + re->re_sastate.sa_saved_indigest[0] = + bswap32(re->re_sastate.sa_saved_indigest[0]); + re->re_sastate.sa_saved_indigest[1] = + bswap32(re->re_sastate.sa_saved_indigest[1]); + re->re_sastate.sa_saved_indigest[2] = + bswap32(re->re_sastate.sa_saved_indigest[2]); } crypto_copyback(crp->crp_flags, crp->crp_buf, crd->crd_inject,