[SSSD] [PATCHES] Add SID related lookups to the NSS responder - part 3
Jakub Hrozek
jhrozek at redhat.com
Fri May 31 12:25:28 UTC 2013
On Tue, May 28, 2013 at 08:30:01AM -0400, Stephen Gallagher wrote:
> -----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)
I like this style and I see it was used in some of your code that I was
going through recently. I'll use it as well..
I would like to propose this as amendment for our coding guidelines, but
since they are shared with FreeIPA, would the right place be
freeipa-devel list?
More information about the sssd-devel
mailing list