[ntp:hackers] Where did BLOCKING_REQ_MAGIC and BLOCKING_RESP_MAGIC get their values?

Brian Utterback brian.utterback at oracle.com
Mon Jul 29 15:36:55 UTC 2013

On 07/29/13 11:22, Warner Losh wrote:
> MAXINT is signed. Those magic numbers have the top bit set, so are larger than ints, hence the warning.
> The magic numbers are needed to make sure the packets are of the proper type, so can't be assigned arbitrarily by the compiler.

I understand why there is a warning, but are they arbitrary or not? Is 
there something outside the code that dictates their values? If not, I 
don't understand why a 1 and 2 or even 0 and 1 wouldn't work just as 
well. If there is some reason why sinple number won't work here, how 
about the same numbers but without the sign bit set?


Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. - Martin Golding
Brian Utterback - Solaris RPE, Oracle Corporation.
Ph:603-262-3916, Em:brian.utterback at oracle.com

More information about the hackers mailing list