changeset 1768:d12253dc9dbb

(rmdir): Use pid_t instead of int; check status against zero. This is to improve portability.
author Jim Meyering <jim@meyering.net>
date Tue, 30 Mar 1999 04:48:41 +0000
parents 88fe48b75cb8
children bc0ac225f0a8
files lib/rmdir.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/rmdir.c
+++ b/lib/rmdir.c
@@ -44,7 +44,8 @@
 rmdir (dpath)
      char *dpath;
 {
-  int cpid, status;
+  pid_t cpid;
+  int status;
   struct stat statbuf;
 
   if (stat (dpath, &statbuf) != 0)
@@ -73,7 +74,7 @@
       while (wait (&status) != cpid)
 	/* Do nothing.  */ ;
 
-      if (status & 0xFFFF)
+      if (status)
 	{
 
 	  /* /bin/rmdir failed.  */