summaryrefslogtreecommitdiff
path: root/t/t4034/pascal/expect
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2010-10-10 21:59:26 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-02-10 13:47:56 -0800
commit1368f65002bf39fdde7dd736a75ae35475184371 (patch)
treecb0d57165c5b1f710bb5e6499fa322185a8deb2f /t/t4034/pascal/expect
parentMerge branch 'maint-1.7.0' into maint (diff)
downloadtgif-1368f65002bf39fdde7dd736a75ae35475184371.tar.xz
compat: helper for detecting unsigned overflow
The idiom (a + b < a) works fine for detecting that an unsigned integer has overflowed, but a more explicit unsigned_add_overflows(a, b) might be easier to read. Define such a macro, expanding roughly to ((a) < UINT_MAX - (b)). Because the expansion uses each argument only once outside of sizeof() expressions, it is safe to use with arguments that have side effects. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034/pascal/expect')
0 files changed, 0 insertions, 0 deletions