[MPlayer-cvslog] r26787 - in trunk/libvo: mga_common.c vo_cvidix.c vo_dfbmga.c vo_dga.c vo_directfb2.c vo_fbdev.c vo_ggi.c vo_gl.c vo_gl2.c vo_macosx.m vo_quartz.c vo_svga.c vo_tga.c vo_vesa.c vo_winvidix.c vo_x11.c vo_xover.c vo_xv.c vo_xvidix.c

Ivan Kalvachev ikalvachev at gmail.com
Sat May 17 00:24:30 CEST 2008


On Fri, May 16, 2008 at 11:40 PM, Reimar Döffinger
<Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> On Fri, May 16, 2008 at 09:55:58PM +0300, Ivan Kalvachev wrote:
>> On Fri, May 16, 2008 at 11:33 AM, diego <subversion at mplayerhq.hu> wrote:
>> > Author: diego
>> > Date: Fri May 16 10:33:27 2008
>> > New Revision: 26787
>> >
>> > Log:
>> > cosmetics: Remove useless parentheses from from return statements.
>>
>> Diego, why are you committing controversial cosmetic changes in code
>> you don't maintain.
>> I strongly request reversal of these commits, they make the code look uglier.
>
> Ugly or not, at least it is consistent. There were about 4 in 50 returns
> using the (), with the apparent reason being that someone else having committed
> them (I did not actually check that).

I can agree with return not having () when the operand is const, label
or variable, but I find it useful when the return operand is equation
or result from another function having () make it easy to distinguish
without need to have syntax highlight.
return("stuff"); definitely looks better;)

Anyway, it is too late now. Somebody else already decided on his own.
And he is never going to read that code with intent to understand it.

> That said, I think the
>> return (int_pause = 1);
> to
>> return int_pause = 1;
> did not exactly improve things, though I am at a loss what the return
> value is supposed to mean -- obviously neither did the author of
> vo_dxr3.
> How about replacing it with the assignment in a extra line and a return VO_TRUE?

I can't find this code in dxr3, but I can find it in vo_gl.c and
vo_gl2.c among the quartz, x11, macosx, xv.
Yes, I agree that always returning VO_TRUE is the correct behavior
(aka the control is processed successfully). The code that uses them
doesn't check the result anyway.



More information about the MPlayer-cvslog mailing list