From owner-svn-src-all@FreeBSD.ORG Fri May 10 03:49:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0377718F; Fri, 10 May 2013 03:49:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EAB3B9AB; Fri, 10 May 2013 03:49:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4A3n5B5081768; Fri, 10 May 2013 03:49:05 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4A3n5qh081766; Fri, 10 May 2013 03:49:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201305100349.r4A3n5qh081766@svn.freebsd.org> From: Eitan Adler Date: Fri, 10 May 2013 03:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250431 - head/usr.bin/xargs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 10 May 2013 03:49:06 -0000 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"