Re: [PATCH] Change "refs/" references to symbolic constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Krzysztof Halasa <khc@xxxxxxxxx> wrote:
> Bill Lear <rael@xxxxxxxxxx> writes:
> 
> > Would this be less error-prone, and just as efficient?:
> >
> > #define PATH_REMOTES "remotes/"
> > #define LIT_STRLEN(S) ((sizeof(S) / sizeof(S[0])) -1)
> > #define STRLEN_PATH_REMOTES LIT_STRLEN(PATH_REMOTES)
> 
> sizeof(char) is always 1.

Except when someone does something silly, like say:

	#define char double

:-)

-- 
Shawn.
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]