X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=CodingStyle;h=22f0f458a26f2c0136265db1dc2aa4f7d9b8efb2;hb=e892d5ffb5749c0534fecd903e3e6a76819f1346;hp=ee7a0e6d4b656c28905cbe382a9618037426d929;hpb=85b20fd6ee585f462e012fbcc7f966a81edab2ed;p=sliver-openvswitch.git diff --git a/CodingStyle b/CodingStyle index ee7a0e6d4..22f0f458a 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.