From owner-svn-src-all@FreeBSD.ORG Mon Feb 13 13:07:57 2012 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 7A43C1065676; Mon, 13 Feb 2012 13:07:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6988D8FC1F; Mon, 13 Feb 2012 13:07:57 +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 q1DD7vjC043818; Mon, 13 Feb 2012 13:07:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1DD7vHn043816; Mon, 13 Feb 2012 13:07:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201202131307.q1DD7vHn043816@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 13 Feb 2012 13:07:57 +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: r231585 - head/sys/netgraph 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: Mon, 13 Feb 2012 13:07:57 -0000 Author: glebius Date: Mon Feb 13 13:07:56 2012 New Revision: 231585 URL: http://svn.freebsd.org/changeset/base/231585 Log: No need to optimise for a node with no hooks, my braino. Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c ============================================================================== --- head/sys/netgraph/ng_socket.c Mon Feb 13 11:59:59 2012 (r231584) +++ head/sys/netgraph/ng_socket.c Mon Feb 13 13:07:56 2012 (r231585) @@ -850,12 +850,9 @@ ngs_findhook(node_p node, const char *na uint32_t h; /* - * Microoptimisations for a ng_socket with no - * hooks, or with a single hook, which is a - * common case. + * Microoptimisation for an ng_socket with + * a single hook, which is a common case. */ - if (node->nd_numhooks == 0) - return (NULL); if (node->nd_numhooks == 1) { hook_p hook;