From 48694f0fea3de47ca53daf9e043ff7dfcd4376b7 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 11 Aug 2000 21:25:19 +0000 Subject: [PATCH] ICU-535 fixed some compiler warnings, and changed the order of an assignment and return according to weiv. X-SVN-Rev: 2206 --- icu4c/source/common/uresdata.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/icu4c/source/common/uresdata.c b/icu4c/source/common/uresdata.c index 7d2554f4e45..c84e16a215d 100644 --- a/icu4c/source/common/uresdata.c +++ b/icu4c/source/common/uresdata.c @@ -269,16 +269,16 @@ U_CFUNC Resource res_getArrayItem(const ResourceData *pResData, const Resource a } U_CFUNC Resource res_getTableItemByKey(const ResourceData *pResData, const Resource table, int32_t* indexR, const char* * key) { - uint16_t tempIndex = 0; + uint16_t tempIndex; if(key != NULL) { tempIndex = _res_findTableIndex(pResData->pRoot, table, *key); - if(tempIndex != URESDATA_ITEM_NOT_FOUND) { - *key = _res_getTableKey(pResData->pRoot, table, tempIndex); - return _res_getTableItem(pResData->pRoot, table, tempIndex); - *indexR = tempIndex; - } else { - return RES_BOGUS; - } + if(tempIndex != URESDATA_ITEM_NOT_FOUND) { + *key = _res_getTableKey(pResData->pRoot, table, tempIndex); + *indexR = tempIndex; + return _res_getTableItem(pResData->pRoot, table, tempIndex); + } else { + return RES_BOGUS; + } } else { return RES_BOGUS; }