(rmdir): Use pid_t instead of int; check status
authorJim Meyering <jim@meyering.net>
Tue, 30 Mar 1999 04:48:41 +0000 (04:48 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 30 Mar 1999 04:48:41 +0000 (04:48 +0000)
against zero.  This is to improve portability.

lib/rmdir.c

index 58b2edb7df584a3597db05cb51162cc0625956d3..2a92803db7e60c14f01b6cd4567657ca746d465d 100644 (file)
@@ -44,7 +44,8 @@ int
 rmdir (dpath)
      char *dpath;
 {
-  int cpid, status;
+  pid_t cpid;
+  int status;
   struct stat statbuf;
 
   if (stat (dpath, &statbuf) != 0)
@@ -73,7 +74,7 @@ rmdir (dpath)
       while (wait (&status) != cpid)
        /* Do nothing.  */ ;
 
-      if (status & 0xFFFF)
+      if (status)
        {
 
          /* /bin/rmdir failed.  */