Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2013 03:24:58 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r252679 - in head/usr.bin: mail make
Message-ID:  <201307040324.r643OwWX033466@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Thu Jul  4 03:24:58 2013
New Revision: 252679
URL: http://svnweb.freebsd.org/changeset/base/252679

Log:
  Remove unnecessary cast to pid_t.

Modified:
  head/usr.bin/mail/popen.c
  head/usr.bin/make/job.c

Modified: head/usr.bin/mail/popen.c
==============================================================================
--- head/usr.bin/mail/popen.c	Thu Jul  4 01:48:55 2013	(r252678)
+++ head/usr.bin/mail/popen.c	Thu Jul  4 03:24:58 2013	(r252679)
@@ -316,7 +316,7 @@ sigchild(int signo __unused)
 	int status;
 	struct child *cp;
 
-	while ((pid = waitpid((pid_t)-1, &status, WNOHANG)) > 0) {
+	while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
 		cp = findchild(pid);
 		if (cp->free)
 			delchild(cp);

Modified: head/usr.bin/make/job.c
==============================================================================
--- head/usr.bin/make/job.c	Thu Jul  4 01:48:55 2013	(r252678)
+++ head/usr.bin/make/job.c	Thu Jul  4 03:24:58 2013	(r252679)
@@ -2128,7 +2128,7 @@ Job_CatchChildren(Boolean block)
 	}
 
 	for (;;) {
-		pid = waitpid((pid_t)-1, &status,
+		pid = waitpid(-1, &status,
 		    (block ? 0 : WNOHANG) | WUNTRACED);
 		if (pid <= 0)
 			break;
@@ -2628,7 +2628,7 @@ Job_AbortAll(void)
 	/*
 	 * Catch as many children as want to report in at first, then give up
 	 */
-	while (waitpid((pid_t)-1, &foo, WNOHANG) > 0)
+	while (waitpid(-1, &foo, WNOHANG) > 0)
 		;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307040324.r643OwWX033466>