diff options
author | pjd <pjd@FreeBSD.org> | 2011-11-26 23:13:30 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2011-11-26 23:13:30 +0000 |
commit | 06a6aab6ccfd5939b66f905fab8e9817a12625bc (patch) | |
tree | 057ab39f658036d57c8aba874c31531f87ec7d32 /sys | |
parent | 2a876c6d0ac8b079f312a0edde14360cecd9d2c1 (diff) | |
download | FreeBSD-src-06a6aab6ccfd5939b66f905fab8e9817a12625bc.zip FreeBSD-src-06a6aab6ccfd5939b66f905fab8e9817a12625bc.tar.gz |
Simplify code a bit.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netipsec/xform_ah.c | 9 | ||||
-rw-r--r-- | sys/netipsec/xform_esp.c | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c index fe53bd0..80c6e80 100644 --- a/sys/netipsec/xform_ah.c +++ b/sys/netipsec/xform_ah.c @@ -770,10 +770,8 @@ ah_input_cb(struct cryptop *crp) if (sav->tdb_cryptoid != 0) sav->tdb_cryptoid = crp->crp_sid; - if (crp->crp_etype == EAGAIN) { - error = crypto_dispatch(crp); - return error; - } + if (crp->crp_etype == EAGAIN) + return (crypto_dispatch(crp)); V_ahstat.ahs_noxform++; DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype)); @@ -1164,8 +1162,7 @@ ah_output_cb(struct cryptop *crp) if (crp->crp_etype == EAGAIN) { IPSECREQUEST_UNLOCK(isr); - error = crypto_dispatch(crp); - return error; + return (crypto_dispatch(crp)); } V_ahstat.ahs_noxform++; diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c index 3010e72..e5d5314 100644 --- a/sys/netipsec/xform_esp.c +++ b/sys/netipsec/xform_esp.c @@ -495,10 +495,8 @@ esp_input_cb(struct cryptop *crp) if (sav->tdb_cryptoid != 0) sav->tdb_cryptoid = crp->crp_sid; - if (crp->crp_etype == EAGAIN) { - error = crypto_dispatch(crp); - return error; - } + if (crp->crp_etype == EAGAIN) + return (crypto_dispatch(crp)); V_espstat.esps_noxform++; DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype)); @@ -947,8 +945,7 @@ esp_output_cb(struct cryptop *crp) if (crp->crp_etype == EAGAIN) { IPSECREQUEST_UNLOCK(isr); - error = crypto_dispatch(crp); - return error; + return (crypto_dispatch(crp)); } V_espstat.esps_noxform++; |