Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

There are some strange code:

    if ifup -a --exclude=lo; then
        log_action_end_msg $?
    else
        log_action_end_msg $?
    fi

both variants have exactly same code:

        log_action_end_msg $?

Why need "if", "then", "else", "fi"? Why not simple:

    ifup -a --exclude=lo
    log_action_end_msg $?

There are 3 times such code in this file.

This file belongs to "netbase" 4.35ubuntu3

share|improve this question
    
logically it is the same –  yossile Mar 25 '12 at 13:26

1 Answer 1

You are right that the if statement appears to be unnecessary. My guess is that the two branches of the if statement did different things in an older version, but the two branches were modified to their current form at some point.

If it bothers you, I'd suggest filing a bug.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.