[SSSD] [PATCH] Cleanups

Dmitri Pal dpal at redhat.com
Sat Nov 7 02:37:33 UTC 2009


Martin Nagy wrote:
> Simo Sorce wrote:
>   
>> This patch adds some cleanups and fixes coding style deviations.
>> There are some more in the resolve code.
>>     
>
> You added braces to if constructs. I was under the impression that we
> shouldn't use them for one line statements [1]. Personally, I find it
> more readable without them, but if the general consensus is to use them
> then someone should update the coding style. Same goes for one liners
> like:
>
> +        if (err) return err;
>
>   
We  said that it is Ok to use braces for one liners but forgot to update
the style guide.
I personally think that there is where few cases where the one liner
should exist.
For example in case above in 99.99% cases it should be:

     if (something) {
         /* Comment on the occasion */
         DEBUG(this_thingy)
         free(whatever);
         return right_thing;
    }

I took an action item to update style guide.

> Martin
>
> [1] http://freeipa.org/page/Coding_Style#IF_Statements
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/sssd-devel
>   


-- 
Thank you,
Dmitri Pal

Engineering Manager IPA project,
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the sssd-devel mailing list