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

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


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gui_ui_main.c.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130126/c8aa920e/attachment.bin>


More information about the MPlayer-dev-eng mailing list