Author: gschneider
Date: Tue Dec 1 19:46:13 2009
New Revision: 44344
URL:
http://svn.reactos.org/svn/reactos?rev=44344&view=rev
Log:
[ntdll]
- Logic change of r37554 is correct, RtlTimeFieldsToTime doesn't normalize invalid
input values - remove these codes
- Related to bug #4917, part 1
Modified:
trunk/reactos/lib/rtl/time.c
Modified: trunk/reactos/lib/rtl/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/time.c?rev=44344&a…
==============================================================================
--- trunk/reactos/lib/rtl/time.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/time.c [iso-8859-1] Tue Dec 1 19:46:13 2009
@@ -61,14 +61,6 @@
return Days;
}
-static __inline void NormalizeTimeFields(CSHORT *FieldToNormalize,
- CSHORT *CarryField,
- int Modulus)
-{
- *FieldToNormalize = (CSHORT) (*FieldToNormalize - Modulus);
- *CarryField = (CSHORT) (*CarryField + 1);
-}
-
/* FUNCTIONS *****************************************************************/
/*
@@ -199,39 +191,6 @@
return FALSE;
}
- /* Normalize the TIME_FIELDS structure here */
- while (IntTimeFields.Second >= SECSPERMIN)
- {
- NormalizeTimeFields(&IntTimeFields.Second,
- &IntTimeFields.Minute,
- SECSPERMIN);
- }
- while (IntTimeFields.Minute >= MINSPERHOUR)
- {
- NormalizeTimeFields(&IntTimeFields.Minute,
- &IntTimeFields.Hour,
- MINSPERHOUR);
- }
- while (IntTimeFields.Hour >= HOURSPERDAY)
- {
- NormalizeTimeFields(&IntTimeFields.Hour,
- &IntTimeFields.Day,
- HOURSPERDAY);
- }
- while (IntTimeFields.Day >
- MonthLengths[IsLeapYear(IntTimeFields.Year)][IntTimeFields.Month - 1])
- {
- NormalizeTimeFields(&IntTimeFields.Day,
- &IntTimeFields.Month,
- SECSPERMIN);
- }
- while (IntTimeFields.Month > MONSPERYEAR)
- {
- NormalizeTimeFields(&IntTimeFields.Month,
- &IntTimeFields.Year,
- MONSPERYEAR);
- }
-
/* Compute the time */
Time->QuadPart = DaysSinceEpoch(IntTimeFields.Year);
for (CurMonth = 1; CurMonth < IntTimeFields.Month; CurMonth++)