On 26 February 2010 18:26, Peter Stuge <peter_at_stuge.se> wrote:
> Overall this is a great improvement - thanks Alex!
My pleasure.
> I'm unhappy with the proliferation of braces for single-statement
> cases. The comment above is also not to well placed IMO, but I find
> the many braces added in this commit to be a worse eyesore. :\
> Is there a coding style rule for this or simply your preference?
No preference. The brackets were necessary before the changes to
libssh2_error and I forgot to take them out again afterwards. The
latest commit changes this.
>> +#ifdef LIBSSH2DEBUG
>> +
>> +int libssh2_error(LIBSSH2_SESSION* session, int errcode, char* errmsg,
>> + int should_free)
...
>> +
>> +#else /* ! LIBSSH2DEBUG */
>> +
>> +int libssh2_error(LIBSSH2_SESSION* session, int errcode, char* errmsg,
>> + int should_free)
...
>> +
>> +#endif /* ! LIBSSH2DEBUG */
>
> The above is very redundant. Please fix it so #ifdef only guards the
> _debug call inside a single copy of the function.
It was copied directly from the original macro but, you're right, now
that it's a function the duplication is unnecessary. The latest
commit fixes this too.
Alex
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-26