[PATCH xf86-video-neomagic] Use fabs() instead of abs() on double value.
Walter Harms
wharms at bfs.de
Sun Feb 10 17:44:07 UTC 2019
> Matthieu Herrb <matthieu at herrb.eu> hat am 10. Februar 2019 um 17:20
> geschrieben:
>
>
> Silences clang warnings.
>
> Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>
Reviewed-by: Walter Harms wharms at bfs,de
> ---
> 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
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list