Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64

2017-04-14 Thread Conrad Meyer
Ian, I don't know about "guaranteed," but it certainly looks like the htonl/bswap macros intend to avoid double-evaluating macro parameters. On Fri, Apr 14, 2017 at 8:53 AM, Ian Lepore wrote: > On Fri, 2017-04-14 at 08:32 -0700, Conrad Meyer wrote: >> On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. E

Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64

2017-04-14 Thread Ian Lepore
On Fri, 2017-04-14 at 08:32 -0700, Conrad Meyer wrote: > On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov > wrote: > > > > Author: ae > > Date: Fri Apr 14 11:58:41 2017 > > New Revision: 316826 > > URL: https://svnweb.freebsd.org/changeset/base/316826 > > > > Log: > >   Avoid undefined behavio

Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64

2017-04-14 Thread Conrad Meyer
On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov wrote: > Author: ae > Date: Fri Apr 14 11:58:41 2017 > New Revision: 316826 > URL: https://svnweb.freebsd.org/changeset/base/316826 > > Log: > Avoid undefined behavior. > > The 'pktid' variable is modified while being used twice between > se

svn commit: r316826 - head/sys/netpfil/ipfw/nat64

2017-04-14 Thread Andrey V. Elsukov
Author: ae Date: Fri Apr 14 11:58:41 2017 New Revision: 316826 URL: https://svnweb.freebsd.org/changeset/base/316826 Log: Avoid undefined behavior. The 'pktid' variable is modified while being used twice between sequence points, probably due to htonl() is macro. Reported by: PVS-Stu