William A. Rowe, Jr. wrote:

>At 06:49 AM 12/12/2002, Jeff Trawick wrote:
>  
>
>>[EMAIL PROTECTED] writes:
>>
>>    
>>
>>>wrowe       2002/12/11 23:01:52
>>>
>>>  Modified:    file_io/unix filestat.c
>>>  Log:
>>>    switch {case} and default: are probably better for handling this case.
>>>    Is anyone aware of a platform where S_IFxxx # isn't available, yet
>>>    S_ISxxx(#) is?
>>>      
>>>
>>RH Linux 7.3 doesn't have S_IFFIFO
>>    
>>
>
>Yet it does have S_ISFIFO?
>
>Bill
>

The funny thing about this change is that, for a short switch like that,
many modern compilers just convert it to a series of "if ... else if"
tests. So just putting the "else"s in there wouldn've been better -- not
to mention more correct. I don't think generating a jump table for just
seven cases makes sense on any platform.

-- 
Brane Äibej   <[EMAIL PROTECTED]>   http://www.xbc.nu/brane/

Reply via email to