]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/vtzone.cpp
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / vtzone.cpp
index 426810ec32257e1a6ab70141d17b490e206987ce..fd8f83a2b9541fefb5d8f7fd7eac53f1e1474a54 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 2007-2013, International Business Machines Corporation and
+* Copyright (C) 2007-2016, International Business Machines Corporation and
 * others. All Rights Reserved.
 *******************************************************************************
 */
@@ -538,7 +538,7 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff
     UnicodeString rrule = *((UnicodeString*)dates->elementAt(0));
     int32_t month, dayOfWeek, nthDayOfWeek, dayOfMonth = 0;
     int32_t days[7];
-    int32_t daysCount = sizeof(days)/sizeof(days[0]);
+    int32_t daysCount = UPRV_LENGTHOF(days);
     UDate until;
 
     parseRRULE(rrule, month, dayOfWeek, nthDayOfWeek, days, daysCount, until, status);
@@ -615,7 +615,7 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff
             UDate tmp_until;
             int32_t tmp_month, tmp_dayOfWeek, tmp_nthDayOfWeek;
             int32_t tmp_days[7];
-            int32_t tmp_daysCount = sizeof(tmp_days)/sizeof(tmp_days[0]);
+            int32_t tmp_daysCount = UPRV_LENGTHOF(tmp_days);
             parseRRULE(rrule, tmp_month, tmp_dayOfWeek, tmp_nthDayOfWeek, tmp_days, tmp_daysCount, tmp_until, status);
             if (U_FAILURE(status)) {
                 return NULL;