From owner-svn-src-all@FreeBSD.ORG Wed Feb 15 15:27:31 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 034A1106566B; Wed, 15 Feb 2012 15:27:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 78C008FC14; Wed, 15 Feb 2012 15:27:30 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q1FFRTmL049620; Wed, 15 Feb 2012 19:27:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q1FFRTUQ049619; Wed, 15 Feb 2012 19:27:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 15 Feb 2012 19:27:29 +0400 From: Gleb Smirnoff To: Bruce Evans Message-ID: <20120215152729.GQ20404@FreeBSD.org> References: <201202151426.q1FEQpn7065868@svn.freebsd.org> <20120216015919.X2940@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20120216015919.X2940@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r231760 - 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: Wed, 15 Feb 2012 15:27:31 -0000 On Thu, Feb 16, 2012 at 02:19:37AM +1100, Bruce Evans wrote: B> On Wed, 15 Feb 2012, Gleb Smirnoff wrote: B> B> > Log: B> > style(9): sort includes. B> > Modified: head/sys/netgraph/ng_base.c B> > ============================================================================== B> > --- head/sys/netgraph/ng_base.c Wed Feb 15 14:23:01 2012 (r231759) B> > +++ head/sys/netgraph/ng_base.c Wed Feb 15 14:26:50 2012 (r231760) B> > @@ -43,25 +43,25 @@ B> > */ B> > B> > #include B> > -#include B> B> systm was already sorted. Like param.h, it defines important macros that B> may be needed by other headers. For example, many headers use KASSERT(). B> KASSERT() happens to be a macro, so this happens to work if the other B> headers only use it in other macros, but this would fail if any of the B> other headers started using it in an inline functions. B> B> > #include B> > #include B> B> errno.h is standard pollution in param.h. Including it directly is a B> style bug. This style bug was not very common. It was in 7 files B> in kern in 4.4BSD-Lite2, 1 in kern in FreeBSD-3 (after I fixed it in B> FreeBSD-2), 4 in kern in FreeBSD-4, and 8 in kern in -current. But B> in the top level directory of netgraph, it is in all 49 of 49 .c files B> in -current. B> B> > #include B> > #include B> > +#include B> > #include B> > #include B> > #include B> > #include B> > #include B> > +#include B> > #include B> B> queue.h is nonstandard pollution in many headers. It has already been B> included (guarded) many times before here. Unfortunately, since it B> is nonstandard, this can't be depended on, though many .c files do. Bruce, is this patch okay? Index: ng_base.c =================================================================== --- ng_base.c (revision 231765) +++ ng_base.c (working copy) @@ -43,8 +43,8 @@ */ #include +#include #include -#include #include #include #include @@ -60,7 +60,6 @@ #include #include #include -#include #include #include I'd prefer to leave sys/queue.h included explicitly. -- Totus tuus, Glebius.