]> The Tcpdump Group git mirrors - tcpdump/commit
From Albert Chin: IBM's AIX C compiler complains about "&buf[sizeof
authorguy <guy>
Wed, 20 Apr 2005 02:59:30 +0000 (02:59 +0000)
committerguy <guy>
Wed, 20 Apr 2005 02:59:30 +0000 (02:59 +0000)
commitc41b9bd9c1b572f5284f32accae78a9006f74c2e
treecde28828ca96ced0b1d6c845084ce95ea871ce90
parent1a5951d7f5985395f938e1601376d6e0f00fac4d
From Albert Chin: IBM's AIX C compiler complains about "&buf[sizeof
buf]", but doesn't complain about the equivalent "buf + sizeof(buf)".
(C89 allows a pointer into an array to point one element past the end of
the array, so both should, at least as I understand it, be legal, and we
decrement the resulting pointer before we use it, so both should be
safe.)
addrtoname.c