mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-17 02:37:25 +00:00
ICU-6132 Move declaration of tempstr to beginning of function.
X-SVN-Rev: 23259
This commit is contained in:
parent
752767bf9d
commit
6c61aa48a8
1 changed files with 2 additions and 1 deletions
|
@ -2852,6 +2852,7 @@ uloc_acceptLanguageFromHTTP(char *result, int32_t resultAvailable, UAcceptResult
|
|||
int32_t i;
|
||||
int32_t l = (int32_t)uprv_strlen(httpAcceptLanguage);
|
||||
int32_t jSize;
|
||||
char *tempstr; /* Use for null pointer check */
|
||||
|
||||
j = smallBuffer;
|
||||
jSize = sizeof(smallBuffer)/sizeof(smallBuffer[0]);
|
||||
|
@ -2893,7 +2894,7 @@ uloc_acceptLanguageFromHTTP(char *result, int32_t resultAvailable, UAcceptResult
|
|||
for(t=(paramEnd-1);(paramEnd>s)&&isspace(*t);t--)
|
||||
;
|
||||
/* Check for null pointer from uprv_strndup */
|
||||
char *tempstr = uprv_strndup(s,(int32_t)((t+1)-s));
|
||||
tempstr = uprv_strndup(s,(int32_t)((t+1)-s));
|
||||
if (tempstr == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue