]> The Tcpdump Group git mirrors - tcpdump/commit
Don't decrement an unsigned zero value below zero.
authorGuy Harris <[email protected]>
Thu, 1 Feb 2018 22:16:11 +0000 (14:16 -0800)
committerGuy Harris <[email protected]>
Thu, 1 Feb 2018 22:16:11 +0000 (14:16 -0800)
commit95e7cd03e61dc2bf90d57d192658cf17acc8f776
tree187eb91c5da3b77419583ad7af2bb5e96818b7d7
parent2f713e9246c357547dfeb2283788ea7831bd03ee
Don't decrement an unsigned zero value below zero.

In fact, don't waste time incrementing the pointer or decrementing the
count until we know that we're going to go through another trip through
the loop.  (This isn't a PDP-11 and probably isn't a VAX or 68k, so *p++
isn't going to be done by an addressing mode.)

This should fix an undefined-behavior warning.
print-isakmp.c