From owner-svn-src-head@FreeBSD.ORG Sun Nov 21 21:31:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376B01065693; Sun, 21 Nov 2010 21:31:30 +0000 (UTC) (envelope-from mckay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26A0C8FC19; Sun, 21 Nov 2010 21:31:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oALLVUYo068589; Sun, 21 Nov 2010 21:31:30 GMT (envelope-from mckay@svn.freebsd.org) Received: (from mckay@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oALLVUDx068587; Sun, 21 Nov 2010 21:31:30 GMT (envelope-from mckay@svn.freebsd.org) Message-Id: <201011212131.oALLVUDx068587@svn.freebsd.org> From: Stephen McKay Date: Sun, 21 Nov 2010 21:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215642 - head/usr.bin/xargs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2010 21:31:30 -0000 Author: mckay Date: Sun Nov 21 21:31:29 2010 New Revision: 215642 URL: http://svn.freebsd.org/changeset/base/215642 Log: Various syntactic tweaks to satisfy style(9). No change to execution. Submitted by: gcooper@ Modified: head/usr.bin/xargs/xargs.c Modified: head/usr.bin/xargs/xargs.c ============================================================================== --- head/usr.bin/xargs/xargs.c Sun Nov 21 19:33:19 2010 (r215641) +++ head/usr.bin/xargs/xargs.c Sun Nov 21 21:31:29 2010 (r215642) @@ -586,14 +586,14 @@ xwait(int block, int *status) { if (pids_empty()) { errno = ECHILD; - return -1; + return (-1); } while ((pid = waitpid(-1, status, block ? 0 : WNOHANG)) > 0) if (pids_remove(pid)) break; - return pid; + return (pid); } static void @@ -625,27 +625,27 @@ waitchildren(const char *name, int waita #define NOPID (0) static void -pids_init() +pids_init(void) { int i; if ((childpids = malloc(maxprocs * sizeof(*childpids))) == NULL) - errx(1, "malloc failed"); + errx(1, "malloc failed"); for (i = 0; i < maxprocs; i++) clearslot(i); } static int -pids_empty() +pids_empty(void) { - return curprocs == 0; + return (curprocs == 0); } static int -pids_full() +pids_full(void) { - return curprocs >= maxprocs; + return (curprocs >= maxprocs); } static void @@ -664,22 +664,22 @@ pids_remove(pid_t pid) int slot; if ((slot = findslot(pid)) < 0) - return 0; + return (0); clearslot(slot); curprocs--; - return 1; + return (1); } static int -findfreeslot() +findfreeslot(void) { int slot; if ((slot = findslot(NOPID)) < 0) errx(1, "internal error: no free pid slot"); - return slot; + return (slot); } static int @@ -689,9 +689,9 @@ findslot(pid_t pid) for (slot = 0; slot < maxprocs; slot++) if (childpids[slot] == pid) - return slot; + return (slot); - return -1; + return (-1); } static void