In article <[EMAIL PROTECTED]> Harlan Stenn <[EMAIL PROTECTED]> writes: >>>> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Per >Hedeland) writes: > >>> if ((pOpts->pzCurOpt != NULL) && (*pOpts->pzCurOpt != NUL)) > >Per> However I do think the use of NUL is unwise, having a plain '\0' there >Per> instead would avoid an initial potentially confusing >Per> misreading/misunderstanding (not incidentally, it is only the libopt >Per> code that uses NUL, the "proper" ntp code uses '\0' everywhere). > >I think this is a personal preference thing.
Certainly if you don't expect others to (need to) read your code. >I wrote tons of code using NUL for '\0' (the former is MUCH easier for me to >type as I have carpal tunnel problems) and I also used NIL instead of >NULL, as I find that much easier to read. That's fine for you - but if others will need to read and understand your code, it's a pretty objective fact that it helps if you stick to the standard idioms of the language in question. For C, that includes neither NUL nor NIL (the presence of a #define for NULL is even part of the language standard requirements IIRC - though of course there is no requirement to use it). --Per Hedeland [EMAIL PROTECTED] _______________________________________________ questions mailing list questions@lists.ntp.org https://lists.ntp.org/mailman/listinfo/questions