]> git.ipfire.org Git - thirdparty/systemd.git/commit
util: improve overflow checks
authorMichal Schmidt <mschmidt@redhat.com>
Mon, 29 Oct 2012 20:04:47 +0000 (21:04 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Mon, 29 Oct 2012 21:57:24 +0000 (22:57 +0100)
commitfd09c93de9337c3df566180d04368353bb3662e7
treea6bc402f8e7fd2947f1557dede8908ab90e017df
parentf36d7992ef9588e24feaae5bb3d103ca63af71bd
util: improve overflow checks

commit 49371bb fixed the observed division by zero, but missed another
occurrence of the same bug. It was also not the optimal fix. We can
simply make the divisor a constant by swapping it with the compared
value.
src/shared/util.c