[PATCH 3/6] Use abs() on integers, not fabs()

Matt Turner mattst88 at gmail.com
Wed Apr 27 16:33:03 PDT 2011


Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
 hw/xfree86/modes/xf86Crtc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c2814d4..92c75b1 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2724,8 +2724,8 @@ xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired)
 	 */
 	if (scan->HDisplay == best->HDisplay &&
 	    scan->VDisplay == best->VDisplay &&
-	    (fabs(scan->VRefresh - desired->VRefresh) <
-	     fabs(best->VRefresh - desired->VRefresh))) {
+	    (abs(scan->VRefresh - desired->VRefresh) <
+	     abs(best->VRefresh - desired->VRefresh))) {
 	    best = scan;
 	}
     }
-- 
1.7.3.4



More information about the xorg-devel mailing list