David Sommerseth <open...@sf.lists.topphemmelig.net> on Thu, 2017/08/24 20:51: > On 24/08/17 20:40, Antonio Quartulli wrote: > > > > > > On 25/08/17 02:40, Christian Hesse wrote: > >> 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. > > > > We try to stick to C99. I think it allows such mix, no? > > That is correct. We set -std=c99 unless CFLAGS already contains -std=. > But we expect OpenVPN to be C99 compliant. > > And C99 allows this.
You are right... So scratch my concern. -- 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);}
pgpEGrDLbx46m.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 Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel