diff options
author | Karl Berry <karl@freefriends.org> | 2022-05-31 01:17:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-05-31 01:17:15 +0000 |
commit | 4066e47693c667d91051785d7bbe909d30a8b09c (patch) | |
tree | be535ccab8551ddc1ab65d86e7007bc404573687 /Build/source/libs/icu/icu-src/source/common/ubrk.cpp | |
parent | 76b41dbf2d1a8bf3f9563393f8c7570b105405f9 (diff) |
icu 71.1
git-svn-id: svn://tug.org/texlive/trunk@63452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/common/ubrk.cpp')
-rw-r--r-- | Build/source/libs/icu/icu-src/source/common/ubrk.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Build/source/libs/icu/icu-src/source/common/ubrk.cpp b/Build/source/libs/icu/icu-src/source/common/ubrk.cpp index bb5bdd1b501..f4e064961f3 100644 --- a/Build/source/libs/icu/icu-src/source/common/ubrk.cpp +++ b/Build/source/libs/icu/icu-src/source/common/ubrk.cpp @@ -168,7 +168,7 @@ ubrk_safeClone( BreakIterator *newBI = ((BreakIterator *)bi)->clone(); if (newBI == NULL) { *status = U_MEMORY_ALLOCATION_ERROR; - } else { + } else if (pBufferSize != NULL) { *status = U_SAFECLONE_ALLOCATED_WARNING; } return (UBreakIterator *)newBI; @@ -176,15 +176,7 @@ ubrk_safeClone( U_CAPI UBreakIterator * U_EXPORT2 ubrk_clone(const UBreakIterator *bi, UErrorCode *status) { - if (U_FAILURE(*status)) { - return nullptr; - } - BreakIterator *newBI = ((BreakIterator *)bi)->clone(); - if (newBI == nullptr) { - *status = U_MEMORY_ALLOCATION_ERROR; - return nullptr; - } - return (UBreakIterator *)newBI; + return ubrk_safeClone(bi, nullptr, nullptr, status); } |