X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/a62d09fcbc8ca9da27887e04112ec143e19b1caf..38fbf2fd31f5cd99b500914d6037b1d06b608645:/icuSources/tools/toolutil/package.cpp diff --git a/icuSources/tools/toolutil/package.cpp b/icuSources/tools/toolutil/package.cpp index 47e766ca..e3354b35 100644 --- a/icuSources/tools/toolutil/package.cpp +++ b/icuSources/tools/toolutil/package.cpp @@ -1,3 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * @@ -6,7 +8,7 @@ * ******************************************************************************* * file name: package.cpp -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -379,7 +381,7 @@ U_CDECL_END U_NAMESPACE_BEGIN -Package::Package() +Package::Package() : doAutoPrefix(FALSE), prefixEndsWithType(FALSE) { inPkgName[0]=0; pkgPrefix[0]=0; @@ -1279,7 +1281,7 @@ Package::sortItems() { } } -void Package::setItemCapacity(int32_t max) +void Package::setItemCapacity(int32_t max) { if(max<=itemMax) { return; @@ -1287,8 +1289,8 @@ void Package::setItemCapacity(int32_t max) Item *newItems = (Item*)uprv_malloc(max * sizeof(items[0])); Item *oldItems = items; if(newItems == NULL) { - fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", - (unsigned long)max*sizeof(items[0]), max); + fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", + (unsigned long)(max*sizeof(items[0])), max); exit(U_MEMORY_ALLOCATION_ERROR); } if(items && itemCount>0) {