From owner-svn-src-head@FreeBSD.ORG Sat Nov 26 23:13:31 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B7191065672; Sat, 26 Nov 2011 23:13:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3288FC18; Sat, 26 Nov 2011 23:13:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAQNDVfJ012489; Sat, 26 Nov 2011 23:13:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAQNDVio012485; Sat, 26 Nov 2011 23:13:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201111262313.pAQNDVio012485@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 26 Nov 2011 23:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228009 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2011 23:13:31 -0000 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++;