[MPlayer-dev-eng] GUI: Strange code in gui/ui/main.c [2]

Hans-Dieter Kosch hdkosch at kabelbw.de
Sat Jan 26 03:53:28 CET 2013


Sorry, the attached file in my preceding post is bogus, was left over from 
editing an old mail.

Hi Ingo,

I discovered strange code in gui/ui/main.c, lines 128++:

case itButton:
       if ( ( SelectedItem > -1 ) &&
          ( ( ( item->message == evPlaySwitchToPause && item->message ==
evPauseSwitchToPlay ) ) ||
            ( ( item->message == evPauseSwitchToPlay && item->message ==
evPlaySwitchToPause ) ) ) )
        { item->pressed=btnDisabled; }
       break;

The '&&' expressions with 'item->message' are obviously always false, and these
both operands to '||' are effectively the same; so, the whole expression can
never be true.

I have no idea, what's intended there; maybe, there's a bug buried?

Hans-Dieter


More information about the MPlayer-dev-eng mailing list