From f77f4c4457ab4a0cf4761ac2d5998e378be15d94 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 30 Mar 1999 04:48:41 +0000 Subject: [PATCH] (rmdir): Use pid_t instead of int; check status against zero. This is to improve portability. --- lib/rmdir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rmdir.c b/lib/rmdir.c index 58b2edb7df..2a92803db7 100644 --- a/lib/rmdir.c +++ b/lib/rmdir.c @@ -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. */ -- 2.30.2