OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4597-g5b3c104
Gerrit Code Review
gerrit@openafs.org
Thu, 26 Feb 2015 12:42:04 -0500
The following commit has been merged in the master branch:
commit 5b3c1042969daec38ccb260e61d665eda0c713ea
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Feb 13 09:47:20 2015 -0500
Fix incorrect uses of abs()
abs(3) is a function of one variable of type int returning int.
labs(3) is a function of one variable of type long returning long.
labs(3) should be used when the input is of type long, as in
kaprocs.c.
Calling anything from the abs(3) family on a variable of unsigned
type is a bogus type pun, and a logical operation which is a no-op.
(Unsigned values are never negative and thus the absolute value
function is the identity over the entire range of values representable
in an unsigned type.) Just remove the use of abs() for unsigned
values, as in kaprocs.c, krb_udp.c, and vldb_check.c
While in kaprocs.c, wrap a long line that was touched for the
conversion to labs(3), spell the argument to time(3) as NULL
instead of 0, remove unneeded parentheses, and correct the spelling
of "reserved".
Change-Id: I0897b250fd885a1230d1622015eec9afe3450b46
Reviewed-on: http://gerrit.openafs.org/11745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/kauth/kaprocs.c | 6 ++++--
src/kauth/krb_udp.c | 2 +-
src/vlserver/vldb_check.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
--
OpenAFS Master Repository