Hmm, the indentation looks different from what I expect in your quote
below.  (It looks OK to me in the original message I posted.)

Here's another look at the style I've always used in OVS, and that I am
suggesting to use in CodingStyle, with leading spaces replaced by
underscores in case something weird happens again:

____if (!isdigit((unsigned char)s[0])
________|| !isdigit((unsigned char)s[1])
________|| !isdigit((unsigned char)s[2])) {
________printf("string %s does not start with 3-digit code\n", s);
____}


On Fri, Nov 16, 2012 at 11:21:44AM -0800, Justin Pettit wrote:
> So you're preferred style is for continued if statements to have one
> space in from the code block?  I'm fine with it, but just want to
> confirm.
> 
> --Justin
> 
> 
> On Nov 16, 2012, at 11:19 AM, Ben Pfaff <b...@nicira.com> wrote:
> 
> > This got changed away from what I actually prefer in commit be2c418b73fc
> > (Cleanup isdigit() warnings.).
> > 
> > Signed-off-by: Ben Pfaff <b...@nicira.com>
> > ---
> > CodingStyle |    4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/CodingStyle b/CodingStyle
> > index b0aeb4e..ee7a0e6 100644
> > --- a/CodingStyle
> > +++ b/CodingStyle
> > @@ -432,8 +432,8 @@ precedence makes it necessary, or unless the operands 
> > are themselves
> > expressions that use && and ||.  Thus:
> > 
> >     if (!isdigit((unsigned char)s[0])
> > -            || !isdigit((unsigned char)s[1])
> > -            || !isdigit((unsigned char)s[2])) {
> > +        || !isdigit((unsigned char)s[1])
> > +        || !isdigit((unsigned char)s[2])) {
> >         printf("string %s does not start with 3-digit code\n", s);
> >     }
> > 
> > -- 
> > 1.7.10.4
> > 
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> 
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to