svn commit: r250431 - head/usr.bin/xargs

Juli Mallett jmallett at FreeBSD.org
Fri May 10 07:51:23 UTC 2013


Eitan,

Are other changes coming to xargs for which these style changes make
sense?  If not, I'd say that style changes which only adjust vertical
whitespace, especially those which mostly add vertical whitespace at
the start of functions with no local variables (which is one of the
most archaic and unusual things style(9) requires), are probably the
most gratuitous and silly style changes to make.  That doesn't even
rise to being a style change, it's just a whitespace change.  And I
really do believe that vertical whitespace changes are much, much
sillier than horizontal whitespace changes.

Curious what the motivation was here; was xargs the only utility in
usr.bin which didn't conform to style(9) in this regard?  (No.)  Was
this part of a tree-wide sweep to finally bring conformity to these
rules?  (I hope not.)  What's the point?*

Juli.

*: Not that I've never made changes equally-gratuitous; I certainly
have, and so would more strongly discourage people from making them
given the regret and embarrassment I feel about having done so with
the aid of years of hindsight, and a greater awareness of how easy it
is to make minor functional improvements, or at least do refactoring
with some purpose in mind, if one just wants to leave one's
thumbprint.  (Watch for standalone commits from people who used to be
very active developers who have recently hit the threshold for getting
commit bit reaper E-Mails.  They're fairly instructive in the art of
making occasional insignificant changes for the sake of making
changes.)

On Thu, May 9, 2013 at 8:49 PM, Eitan Adler <eadler at freebsd.org> wrote:
> Author: eadler
> Date: Fri May 10 03:49:05 2013
> New Revision: 250431
> URL: http://svnweb.freebsd.org/changeset/base/250431
>
> Log:
>   Style(9) changes fo xargs.c
>
> Modified:
>   head/usr.bin/xargs/xargs.c
>
> Modified: head/usr.bin/xargs/xargs.c
> ==============================================================================
> --- head/usr.bin/xargs/xargs.c  Fri May 10 03:42:48 2013        (r250430)
> +++ head/usr.bin/xargs/xargs.c  Fri May 10 03:49:05 2013        (r250431)
> @@ -670,12 +670,14 @@ pids_init(void)
>  static int
>  pids_empty(void)
>  {
> +
>         return (curprocs == 0);
>  }
>
>  static int
>  pids_full(void)
>  {
> +
>         return (curprocs >= maxprocs);
>  }
>
> @@ -709,7 +711,6 @@ findfreeslot(void)
>
>         if ((slot = findslot(NOPID)) < 0)
>                 errx(1, "internal error: no free pid slot");
> -
>         return (slot);
>  }
>
> @@ -721,13 +722,13 @@ findslot(pid_t pid)
>         for (slot = 0; slot < maxprocs; slot++)
>                 if (childpids[slot] == pid)
>                         return (slot);
> -
>         return (-1);
>  }
>
>  static void
>  clearslot(int slot)
>  {
> +
>         childpids[slot] = NOPID;
>  }
>
> @@ -762,6 +763,7 @@ prompt(void)
>  static void
>  usage(void)
>  {
> +
>         fprintf(stderr,
>  "usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]]\n"
>  "             [-J replstr] [-L number] [-n number [-x]] [-P maxprocs]\n"


More information about the svn-src-head mailing list