From 533b801efc1745f6f98d0247301990b809a41acc Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 4 Nov 2004 19:13:23 +0000 Subject: [PATCH] ICU-3591 use uprv_stricmp not strcasecmp, don't free unallocated pointers. X-SVN-Rev: 16752 --- icu4c/source/common/uloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icu4c/source/common/uloc.c b/icu4c/source/common/uloc.c index c5f84da950..7986a4f434 100644 --- a/icu4c/source/common/uloc.c +++ b/icu4c/source/common/uloc.c @@ -2795,7 +2795,7 @@ static int uloc_acceptLanguageCompare(const void *a, const void *b) } if(rc==0) { - rc = strcasecmp(aa->locale, bb->locale); + rc = uprv_stricmp(aa->locale, bb->locale); } #if defined(ULOC_DEBUG) @@ -2910,7 +2910,7 @@ uloc_acceptLanguage(char *result, int32_t resultAvailable, int32_t acceptListCount, UEnumeration* availableLocales, UErrorCode *status) { - int32_t i; + int32_t i,j; int32_t len; int32_t maxLen=0; char tmp[ULOC_FULLNAME_CAPACITY+1]; @@ -2939,8 +2939,8 @@ uloc_acceptLanguage(char *result, int32_t resultAvailable, if(len>0) { uprv_strncpy(result, l, uprv_min(len, resultAvailable)); } - for(i=0;i