[PATCH 3/6] Use abs() on integers, not fabs()
Michel Dänzer
michel at daenzer.net
Thu Apr 28 01:56:27 PDT 2011
On Mit, 2011-04-27 at 19:33 -0400, Matt Turner wrote:
> 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))) {
VRefresh is a float.
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg-devel
mailing list