apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: cvs commit: apr/file_io/unix filestat.c
Date Thu, 12 Dec 2002 15:28:35 GMT
William A. Rowe, Jr. wrote:

>At 06:49 AM 12/12/2002, Jeff Trawick wrote:
>  
>
>>wrowe@apache.org 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   <brane@xbc.nu>   http://www.xbc.nu/brane/


Mime
View raw message