mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-14 10:29:33 +00:00
2c78b6db6cc4da9db6d6bab7e4d1e62d90a295c3
It turns out that subtracting NULL from a pointer to turn it into an integer is not a good idea, because subtracting a NULL pointer is undefined behaviour in C. The correct way to do this is simply to cast the pointer to uintptr_t. The only fly in this ointment is that the C standard does not mandate support for uintptr_t. In practice, I doubt anyone is running dnsmasq on the long-dead architectures where this might be a problem. Thanks to Matthias Andree for the heads-up.
Languages
C
94.3%
Perl
2.2%
HTML
1.2%
Shell
1%
Makefile
0.6%
Other
0.6%