Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: source/common/uhash.c

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/uhash.h ('k') | source/common/uinit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/uhash.c
diff --git a/source/common/uhash.c b/source/common/uhash.c
index 5dd6ba3441c8131e9e143f85d4d8e480de745594..400157dc92b1c4306519a68ed526ca8f72b10701 100644
--- a/source/common/uhash.c
+++ b/source/common/uhash.c
@@ -1,6 +1,6 @@
/*
******************************************************************************
-* Copyright (C) 1997-2011, International Business Machines
+* Copyright (C) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* Date Name Description
@@ -575,7 +575,7 @@ uhash_close(UHashtable *hash) {
}
if (hash->elements != NULL) {
if (hash->keyDeleter != NULL || hash->valueDeleter != NULL) {
- int32_t pos=-1;
+ int32_t pos=UHASH_FIRST;
UHashElement *e;
while ((e = (UHashElement*) uhash_nextElement(hash, &pos)) != NULL) {
HASH_DELETE_KEY_VALUE(hash, e->key.pointer, e->value.pointer);
@@ -756,7 +756,7 @@ uhash_iremovei(UHashtable *hash,
U_CAPI void U_EXPORT2
uhash_removeAll(UHashtable *hash) {
- int32_t pos = -1;
+ int32_t pos = UHASH_FIRST;
const UHashElement *e;
U_ASSERT(hash != NULL);
if (hash->count != 0) {
@@ -885,7 +885,7 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){
return FALSE;
}
- pos=-1;
+ pos=UHASH_FIRST;
for(i=0; i<count1; i++){
const UHashElement* elem1 = uhash_nextElement(hash1, &pos);
const UHashTok key1 = elem1->key;
« no previous file with comments | « source/common/uhash.h ('k') | source/common/uinit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698