From fd3f43887a8654a6633d6c1b2a31c87eb4f92ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 20 May 2015 22:05:58 +0000 Subject: [PATCH] [ntvdm]: use an "unsigned" abs for the comparison (that's what I want). fix msvc warning. svn path=/trunk/; revision=67837 --- reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c b/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c index d3e313780ec..2725e04fa47 100644 --- a/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c +++ b/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c @@ -160,10 +160,8 @@ VOID PulseSample(VOID) /* * Magic begins there... */ -#ifndef ABS -#define ABS(x) ((x) < 0 ? -(x) : (x)) -#endif - if (ABS(CurrPulsesFreq - LastPulsesFreq) > 7) +#define UABS(x) (ULONG)((LONG)(x) < 0 ? -(LONG)(x) : (x)) + if (UABS(CurrPulsesFreq - LastPulsesFreq) > 7) { /* * This can be a "large" fluctuation so ignore it for now, but take