[ovs-dev] [PATCH] CodingStyle: Mention our common return value conventions.
Ben Pfaff
blp at nicira.com
Mon Mar 4 16:14:29 UTC 2013
Thanks, applied to master.
On Fri, Mar 01, 2013 at 02:56:00PM -0800, Justin Pettit wrote:
> Looks good.
>
> --Justin
>
>
> On Mar 1, 2013, at 11:02 AM, Ben Pfaff <blp at nicira.com> wrote:
>
> > CC: Andy Zhou <azhou at nicira.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > CodingStyle | 12 ++++++++++++
> > 1 files changed, 12 insertions(+), 0 deletions(-)
> >
> > diff --git a/CodingStyle b/CodingStyle
> > index ee7a0e6..22f0f45 100644
> > --- a/CodingStyle
> > +++ b/CodingStyle
> > @@ -249,6 +249,18 @@ details. (Some compilers also assume that the "if" branch is the more
> > common case, so this can be a real form of optimization as well.)
> >
> >
> > +RETURN VALUES
> > +
> > + For functions that return a success or failure indication, prefer
> > +one of the following return value conventions:
> > +
> > + * An "int" where 0 indicates success and a positive errno value
> > + indicates a reason for failure.
> > +
> > + * A "bool" where true indicates success and false indicates
> > + failure.
> > +
> > +
> > MACROS
> >
> > Don't define an object-like macro if an enum can be used instead.
> > --
> > 1.7.2.5
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list