On Sat, November 11, 2006 8:31, Christian Biere said:
> Lloyd Bryant wrote:
>> I found this section of code in "src/core/hosts.c":
>>
>> 149 if (count >= quick_connect_pool_size)
>> 150 if (dbg > 10) {
>> 151 g_message("host_timer - count %d >= pool size %d",
>> 152 count, quick_connect_pool_size);
>> 153 return;
>> 154 }
>>
>> Note that the close brace "}" is aligned to the "if (count..." line, but
>> it's corresponding open brace "{" is at the end of the "if (dbg..."
>> line.
>
> Nice catch. I think this shows why optimizing '{' and '}' away is
> error-prone
> BS. I really wish the syntax wouldn't allow both so that this was never a
> question of "style".
Much as I agree with you (I always use braces in my private code) our
style guideline 6.2 does allow people to do the single line:
if (condition)
do_something();
Maybe we should remove that rule and insist on braces all the time?
Are there any static tools we could use to point out derogations from the
STYLE document in the code base?
>
> --
> Christian
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gtk-gnutella-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
>
>
--
Alex
http://www.bennee.com/~alex/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel