From owner-svn-src-all@FreeBSD.ORG Tue Jan 11 01:11:07 2011 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 C5A2B106564A; Tue, 11 Jan 2011 01:11:07 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B544A8FC0C; Tue, 11 Jan 2011 01:11:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0B1B7m7001501; Tue, 11 Jan 2011 01:11:07 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B1B7WJ001499; Tue, 11 Jan 2011 01:11:07 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201101110111.p0B1B7WJ001499@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 11 Jan 2011 01:11:07 +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: r217250 - head/sys/kern 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: Tue, 11 Jan 2011 01:11:07 -0000 Author: lstewart Date: Tue Jan 11 01:11:07 2011 New Revision: 217250 URL: http://svn.freebsd.org/changeset/base/217250 Log: Fix hhook_head_is_virtualised() so that "ret" can't be used uninitialised. Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 9 weeks X-MFC with: r216615 Modified: head/sys/kern/kern_hhook.c Modified: head/sys/kern/kern_hhook.c ============================================================================== --- head/sys/kern/kern_hhook.c Tue Jan 11 00:58:49 2011 (r217249) +++ head/sys/kern/kern_hhook.c Tue Jan 11 01:11:07 2011 (r217250) @@ -380,11 +380,12 @@ hhook_head_is_virtualised(struct hhook_h { uint32_t ret; - if (hhh == NULL) - return (0); + ret = 0; - if (hhh->hhh_flags & HHH_ISINVNET) - ret = HHOOK_HEADISINVNET; + if (hhh != NULL) { + if (hhh->hhh_flags & HHH_ISINVNET) + ret = HHOOK_HEADISINVNET; + } return (ret); }