[PATCH xf86-video-neomagic] Use fabs() instead of abs() on double value.

Matthieu Herrb matthieu at herrb.eu
Sun Feb 10 16:20:27 UTC 2019


Silences clang warnings.

Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>
---
 src/neo_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/neo_driver.c b/src/neo_driver.c
index 84e09ca..4301881 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -2953,7 +2953,7 @@ neoCalcVCLK(ScrnInfoPtr pScrn, long freq)
 	for (n = 0; n <= MAX_N; n++)
 	    for (d = 1; d <= MAX_D; d++) {
 		f_out = (n+1.0)/((d+1.0)*(1<<f))*REF_FREQ;
-		f_diff = abs(f_out-f_target);
+		f_diff = fabs(f_out-f_target);
 		if (f_diff < f_best_diff) {
 		    f_best_diff = f_diff;
 		    n_best = n;
-- 
2.20.1



More information about the xorg-devel mailing list