diff options
Diffstat (limited to 'compat/waitpid.c')
| -rw-r--r-- | compat/waitpid.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compat/waitpid.c b/compat/waitpid.c index ec03cab..8f65799 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -1,4 +1,4 @@ -/* +/* * waitpid.c -- * * This procedure emulates the POSIX waitpid kernel call on BSD systems @@ -70,7 +70,7 @@ waitpid( int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { - WaitInfo *waitPtr, *prevPtr; + register WaitInfo *waitPtr, *prevPtr; pid_t result; WAIT_STATUS_TYPE status; @@ -100,7 +100,7 @@ waitpid( } else { prevPtr->nextPtr = waitPtr->nextPtr; } - ckfree(waitPtr); + ckfree((char *) waitPtr); return result; } @@ -156,11 +156,7 @@ waitpid( goto waitAgain; } } - waitPtr = (WaitInfo *) attemptckalloc(sizeof(WaitInfo)); - if (!waitPtr) { - errno = ENOMEM; - return -1; - } + waitPtr = (WaitInfo *) ckalloc(sizeof(WaitInfo)); waitPtr->pid = result; waitPtr->status = status; waitPtr->nextPtr = deadList; |
