svn commit: r227164 - head/usr.bin/du
Alexander Best
arundel at freebsd.org
Sun Nov 6 20:46:19 UTC 2011
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 <sysexits.h>
> #include <unistd.h>
>
> -SLIST_HEAD(ignhead, ignentry) ignores;
> +static SLIST_HEAD(ignhead, ignentry) ignores;
> struct ignentry {
> char *mask;
> SLIST_ENTRY(ignentry) next;
-------------- next part --------------
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;
More information about the svn-src-all
mailing list