Author: hbelusca Date: Wed May 20 22:05:58 2015 New Revision: 67837
URL: http://svn.reactos.org/svn/reactos?rev=67837&view=rev Log: [ntvdm]: use an "unsigned" abs for the comparison (that's what I want). fix msvc warning.
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hardw... ============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/sound/speaker.c [iso-8859-1] Wed May 20 22:05:58 2015 @@ -160,10 +160,8 @@ /* * 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