mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
(rmdir): Use pid_t instead of int; check status
against zero. This is to improve portability.
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user