Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: source/i18n/colldata.cpp

Issue 9420032: Take care of two Clang warnings. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/icu46/
Patch Set: final patch Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patches/clang.patch ('k') | source/i18n/decNumber.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/colldata.cpp
===================================================================
--- source/i18n/colldata.cpp (revision 122360)
+++ source/i18n/colldata.cpp (working copy)
@@ -236,9 +236,14 @@
int32_t newMax = listMax + STRING_LIST_BUFFER_SIZE;
UnicodeString *newStrings = new UnicodeString[newMax];
+ if (newStrings == NULL) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ return;
+ }
+ for (int32_t i=0; i<listSize; ++i) {
+ newStrings[i] = strings[i];
+ }
- uprv_memcpy(newStrings, strings, listSize * sizeof(UnicodeString));
-
#ifdef INSTRUMENT_STRING_LIST
int32_t _h = listSize / STRING_LIST_BUFFER_SIZE;
« no previous file with comments | « patches/clang.patch ('k') | source/i18n/decNumber.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698