From owner-svn-src-all@FreeBSD.ORG Sun Nov 6 20:46:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 32F391065675; Sun, 6 Nov 2011 20:46:19 +0000 (UTC) Date: Sun, 6 Nov 2011 20:46:19 +0000 From: Alexander Best To: Ed Schouten Message-ID: <20111106204619.GA76768@freebsd.org> References: <201111060815.pA68FIvC008341@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <201111060815.pA68FIvC008341@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227164 - head/usr.bin/du 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 Nov 2011 20:46:19 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun Nov 6 11, Ed Schouten wrote: > Author: ed > Date: Sun Nov 6 08:15:17 2011 > New Revision: 227164 > URL: http://svn.freebsd.org/changeset/base/227164 > > Log: > Add missing static keywords to du(1) this diff was flying around in my /usr/src, which makes some code a bit more readable. maybe this is something worth having in HEAD? cheers. alex > > Modified: > head/usr.bin/du/du.c > > Modified: head/usr.bin/du/du.c > ============================================================================== > --- head/usr.bin/du/du.c Sun Nov 6 08:14:57 2011 (r227163) > +++ head/usr.bin/du/du.c Sun Nov 6 08:15:17 2011 (r227164) > @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -SLIST_HEAD(ignhead, ignentry) ignores; > +static SLIST_HEAD(ignhead, ignentry) ignores; > struct ignentry { > char *mask; > SLIST_ENTRY(ignentry) next; --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="du.c.diff" diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index cdaa70d..4089e04 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -231,15 +231,14 @@ main(int argc, char *argv[]) listall = 0; - if (aflag) { - if (sflag || dflag) - usage(); + if (aflag + dflag + sflag > 1) + usage(); + + if (aflag) listall = 1; - } else if (sflag) { - if (dflag) - usage(); + + if (sflag) depth = 0; - } if (!*argv) { argv = save; --zhXaljGHf11kAtnf--