From owner-svn-src-all@FreeBSD.ORG Sun Sep 6 16:25:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6869B106566B; Sun, 6 Sep 2009 16:25:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id CE4798FC16; Sun, 6 Sep 2009 16:25:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8140941C6B4; Sun, 6 Sep 2009 18:25:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id iR1eR9GuW2BO; Sun, 6 Sep 2009 18:25:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id D5EB041C6A7; Sun, 6 Sep 2009 18:25:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id AB1024448E6; Sun, 6 Sep 2009 16:22:20 +0000 (UTC) Date: Sun, 6 Sep 2009 16:22:20 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Pawel Jakub Dawidek In-Reply-To: <200909060732.n867WGwc076608@svn.freebsd.org> Message-ID: <20090906162102.Q68375@maildrop.int.zabbadoz.net> References: <200909060732.n867WGwc076608@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196883 - head/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 16:25:08 -0000 On Sun, 6 Sep 2009, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Sun Sep 6 07:32:16 2009 > New Revision: 196883 > URL: http://svn.freebsd.org/changeset/base/196883 > > Log: > Improve code a bit by eliminating goto and having one unlock per lock. This does not coompile anymore: HEAD.svn/sys/netipsec/key.c: In function 'key_checkrequest': HEAD.svn/sys/netipsec/key.c: warning: 'state_valid' may be used uninitialized in this function HEAD.svn/sys/netipsec/key.c: note: 'state_valid' was declared here > Modified: > head/sys/netipsec/key.c > > Modified: head/sys/netipsec/key.c > ============================================================================== > --- head/sys/netipsec/key.c Sun Sep 6 07:30:21 2009 (r196882) > +++ head/sys/netipsec/key.c Sun Sep 6 07:32:16 2009 (r196883) > @@ -918,15 +918,14 @@ key_allocsa_policy(const struct secasind > state_valid = saorder_state_valid_prefer_new; > arraysize = N(saorder_state_valid_prefer_new); > } > - SAHTREE_UNLOCK(); > - goto found; > + break; > } > } > SAHTREE_UNLOCK(); > > - return NULL; > + if (sah == NULL) > + return NULL; > > - found: > /* search valid state */ > for (stateidx = 0; stateidx < arraysize; stateidx++) { > sav = key_do_allocsa_policy(sah, state_valid[stateidx]); > -- Bjoern A. Zeeb What was I talking about and who are you again?