David Sommerseth <open...@sf.lists.topphemmelig.net> on Thu, 2017/08/24 20:16:
> On 24/08/17 09:57, Antonio Quartulli wrote:
> > My effort in writing the commit message has been quite poor.
> > 
> > The assignment is useless because 'ret' is re-assigned a few lines later
> > without ever being read.  
> Hmmm.  I'm not convinced of this change.  But I'm also weird in these
> cases :)
> I think it is good defensive programming to predefine the state of
> variables.  When that is not done, it is up the the compiler to decide
> what to do - which most of the times does a sane job these days.  But
> you're at the mercy of the compiler.
> In this case,  I would expect the compiler to optimize this out anyway,
> regardless of the approaches used.  The compiler doesn't necessarily set
> the value first to true and then to change it to the output of
> multi_process_post().  It might just as well postpone the declaration.
> So I think a better approach would be to completely move the "bool ret"
> down.  So it will become:
>    bool ret = multi_process_post(m, mi, mpp_flags);
> Which I think is also closer to what the compiler would end up with anyway.

ISO C90 forbids mixed declarations and code in C. Probably compilers will
start to complain.
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}

Attachment: pgp9YMP02N81Q.pgp
Description: OpenPGP digital signature

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Openvpn-devel mailing list

Reply via email to