On Feb 15, 2013, at 5:11 PM, Ryan Schmidt <ryandes...@macports.org> wrote:

>> +    if {[string first "macports-gcc" $compiler] == 0 ||
>> +        [string first "dragonegg-" $compiler] == 0} {
>> +        return no
>> +    } else {
>> +        return yes
>>     }
> 
> Can't this be:
> 
>    return [string first "macports-gcc" $compiler] == 0 ||
>        [string first "dragonegg-" $compiler] == 0
> 
> 
>> +proc portconfigure::compiler_is_port {compiler} {
>> +    if {[portconfigure::compiler_port_name ${compiler}] == ""} {
>> +        return no
>> +    } else {
>> +        return yes
>> +    }
>> +}
> 
> Can't this be:
> 
> proc portconfigure::compiler_is_port {compiler} {
>    return [portconfigure::compiler_port_name ${compiler}] == ""
> }

I think you have the logic backwards. Both of those expressions would have to 
be negated before returning the result. Jeremy's original if statements return 
"no" when the conditionals evaluate to "true".

vq
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to