please ignore my previous email. I hate when I accidentally hit send...

Evan Layton wrote:
>>
>>> 3054: Can be optimized as:
>>>     return (! (strcmp((char *)be_get_default_isa(), name) == 0));
>> This amounts to basically the same thing and doesn't seem like much of an
>> optimization. I believe that the compiler will do much the same thing for
>> either one of these. I think the way it is is a bit more readable.

I thought about this one some more last night and noticed that using what was 
first suggested changes the logic to the opposite of what needed. However that 
kind of illustrates that I'm not really correct in saying that what's there is 
easier to read. There are two possibilities here:

     return ((strcmp((char *)be_get_default_isa(), name) == 0));

Which is similar to what was suggested, or:

     return ((strcmp((char *)be_get_default_isa(),
             name) == 0) ? B_TRUE : B_FALSE);

Now that I've looked at these lines more and played with this a bit I agree 
with 
you. The second line here is over kill and I like the first one a bit better. 
I've made this change and the rest of the changes from my response to your 
comments. The webrev has also been updated.


Thanks!
-evan

Reply via email to