PATCH: dlls/oleaut32/variant.c -- minor fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is really dead code on all of our current (and most probably also
future platforms): USHRT_MAX is 2^16 which is smaller than DATE_MAX which
is 2958465.

Gerald

ChangeLog:
Wrap "dead code" into proper #if/#endif in VarDateFromUI2().
Index: oleaut32/variant.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/variant.c,v
retrieving revision 1.74
diff -u -3 -p -r1.74 variant.c
--- oleaut32/variant.c	28 Oct 2003 21:45:31 -0000	1.74
+++ oleaut32/variant.c	8 Nov 2003 10:44:05 -0000
@@ -3113,10 +3113,12 @@ HRESULT WINAPI VarDateFromUI2(USHORT uiI
 {
 	TRACE("( %d, %p ), stub\n", uiIn, pdateOut );

+#if USHRT_MAX > DATE_MAX
 	if( uiIn > DATE_MAX )
 	{
 		return DISP_E_OVERFLOW;
 	}
+#endif

 	*pdateOut = (DATE) uiIn;



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux