[SSSD] [PATCHES] Add SID related lookups to the NSS responder - part 3

Stephen Gallagher sgallagh at redhat.com
Tue May 28 12:30:01 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/27/2013 01:55 PM, Jakub Hrozek wrote:
> On Tue, May 14, 2013 at 06:07:05PM +0200, Jakub Hrozek wrote:
>> On Mon, May 13, 2013 at 12:33:46PM +0200, Sumit Bose wrote:
>>> +    if (el->values[0].length > 2 && +
>>> el->values[0].data[0] == 'S' && +        el->values[0].data[1]
>>> == '-') +    {
>> 
>> Ack I will just reformat this opening bracket to conform to our
>> coding guidelines.
> 
> By the way I was thinking about coding style with respect to
> multi-lined conditional statements and I see the point in using
> this style, I just don't like this particular implementation :-)
> It's sometimes hard to see where the conditional ends and the code
> inside the block beings.
> 
> I wonder if an empty space (which I saw Ondra using) would help
> with cases like this in the future?
> 
> if (hungry == true && has_food == true) {
> 
> eat(); }

I *thought* our coding guidelines recommended this format (but I must
have been remembering it from another project somewhere):

if (hungry == true
        && has_food == true
        && !(food_type == apple
                 && deliveryperson == witch)) {
    eat();
}

i.e. that the conditional operators should lead all the subsequent
lines - acting as a delimiter - and subsequent conditional lines
should be indented. I find this approach to be easily readable as well
as making nested conditionals more clear)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlGko0kACgkQeiVVYja6o6PmuwCfV2xjzVwQbPDh6ici7ojWFaBp
XvsAmgN/7YAZGYS3eM1Z4DiRZiwOEplA
=CVLU
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list