[PATCH] Fix mod() definition.

Matthias Hopf mhopf at suse.de
Fri May 7 09:46:30 PDT 2010


Presumably no implications, especially security-wise.

Signed-off-by: Matthias Hopf <mhopf at suse.de>
---
 mi/miarc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mi/miarc.c b/mi/miarc.c
index 5fd1a67..ddcbff7 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -1524,7 +1524,7 @@ miRoundCap(
 
 # define Dsin(d)	((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0)))
 # define Dcos(d)	((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0)))
-# define mod(a,b)	((a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
+# define mod(a,b)	((a) >= 0 ? (a) % (b) : (b) - (-(a)) % (b))
 
 static double
 miDcos (double a)
-- 
1.6.0.2



More information about the xorg-devel mailing list