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.
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);
}