Date: Sat, 26 Nov 2011 23:13:31 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228009 - head/sys/netipsec Message-ID: <201111262313.pAQNDVio012485@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Sat Nov 26 23:13:30 2011 New Revision: 228009 URL: http://svn.freebsd.org/changeset/base/228009 Log: Simplify code a bit. Modified: head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Sat Nov 26 23:11:41 2011 (r228008) +++ head/sys/netipsec/xform_ah.c Sat Nov 26 23:13:30 2011 (r228009) @@ -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++; Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Sat Nov 26 23:11:41 2011 (r228008) +++ head/sys/netipsec/xform_esp.c Sat Nov 26 23:13:30 2011 (r228009) @@ -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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111262313.pAQNDVio012485>