ICU-6176 Fix some Coverity warnings.

X-SVN-Rev: 23504
This commit is contained in:
George Rhoten 2008-02-28 00:21:28 +00:00
parent 6019297d79
commit a880af6cec

View File

@ -407,11 +407,13 @@ printNoteElements(UnicodeString *Accumulator, struct UString *src, UErrorCode *s
count = getCount(src->fChars,src->fLength, UPC_NOTE, status); count = getCount(src->fChars,src->fLength, UPC_NOTE, status);
if(U_FAILURE(*status)){ if(U_FAILURE(*status)){
uprv_free(note);
return; return;
} }
for(i=0; i < count; i++){ for(i=0; i < count; i++){
noteLen = getAt(src->fChars,src->fLength, &note, capacity, i, UPC_NOTE, status); noteLen = getAt(src->fChars,src->fLength, &note, capacity, i, UPC_NOTE, status);
if(U_FAILURE(*status)){ if(U_FAILURE(*status)){
uprv_free(note);
return; return;
} }
if(noteLen > 0){ if(noteLen > 0){