James Carlson wrote:
> Vladimir Kotal wrote:
>> New webrev is here:
>>   http://cr.opensolaris.org/~vkotal/daemon_libc-4471189.onnv.checks/
> 
> A few very minor nits:
> 
>   - open(2) actually returns -1 on error, so I prefer "== -1" instead
>     of "< 0".  Nobody's going to have 2G open descriptors, so it doesn't
>     matter, but still ...

Changed.

>   - there's no need to check whether fd is equal to the dup2 target
>     before calling dup2(2); that system call is defined to do exactly
>     nothing if the fd arguments are equal.  (But if you feel it's
>     clearer or somehow better to check first, go ahead.)

I wanted to avoid the syscall if possible, hence the checks.

>   - got lint?  (Missing (void) casts on those new close(2) calls.)

Added; note to self: should probably learn to run lint more frequently.

> Other than that, +1.

Thanks for the review !

New webrev is here:
   http://cr.opensolaris.org/~vkotal/daemon_libc-4471189.onnv.final/


v.

Reply via email to