[PATCH xquartz 02/10] randr: Correct a miscall of abs() to instead call fabs()

Keith Packard keithp at keithp.com
Fri Oct 16 08:00:17 PDT 2015


Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> Long long ago, the xserver's include/misc.h had:
> #define abs(a) ((a) > 0 ? (a) : -(a))
> which worked for code like this, but git history says that was removed in
> XFree86 4.3.0.1 (commit d568221710959cf in the current xserver git repo)
> and we've just been sloppy ever since.

I'm pretty sure that macro was written before there was an int abs(int i)
function in libc.

Nice catch Jeremy.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20151016/0df17fd7/attachment.sig>


More information about the xorg-devel mailing list