Andy Parkins <andyparkins@xxxxxxxxx> writes: > Bill Lear pointed out that the following: > > #define PATH_REMOTES "remotes/" > #define STRLEN_PATH_REMOTES 8 > > Could be replaced by the less error-prone > > #define PATH_REMOTES "remotes/" > #define LIT_STRLEN(S) ((sizeof(S) / sizeof(S[0])) -1) > #define STRLEN_PATH_REMOTES LIT_STRLEN(PATH_REMOTES) > > which is what this patch does. I do not think the above is wrong per se, but doesn't a good compiler optimize #define PATH_REMOTES "remotes/" #define STRLEN_PATH_REMOTES strlen(PATH_REMOTES) ... and much later in some *.c file that includes the ... above and <string.h> foo = strlen(PATH_REMOTES) anyway? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html