Index: source/common/ulist.c |
diff --git a/source/common/ulist.c b/source/common/ulist.c |
index aa506584e718a194781867247a6d9ef5b9c7910f..6b5013b0ecdf7bc23f8e5781287bbc0ef793796e 100644 |
--- a/source/common/ulist.c |
+++ b/source/common/ulist.c |
@@ -1,6 +1,6 @@ |
/* |
****************************************************************************** |
-* Copyright (C) 2009-2012, International Business Machines |
+* Copyright (C) 2009-2014, International Business Machines |
* Corporation and others. All Rights Reserved. |
****************************************************************************** |
*/ |
@@ -174,18 +174,16 @@ U_CAPI void U_EXPORT2 ulist_resetList(UList *list) { |
U_CAPI void U_EXPORT2 ulist_deleteList(UList *list) { |
UListNode *listHead = NULL; |
- UListNode *listPointer = NULL; |
- |
+ |
if (list != NULL) { |
listHead = list->head; |
- listPointer = listHead; |
while (listHead != NULL) { |
- listPointer = listHead->next; |
- |
+ UListNode *listPointer = listHead->next; |
+ |
if (listHead->forceDelete) { |
uprv_free(listHead->data); |
} |
- |
+ |
uprv_free(listHead); |
listHead = listPointer; |
} |