X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b331163bffd790ced0e88b73f44f86d49ccc48a5..f59164e3d128c7675a4d3934206346a3384e53a5:/icuSources/extra/uconv/uconv.cpp?ds=inline diff --git a/icuSources/extra/uconv/uconv.cpp b/icuSources/extra/uconv/uconv.cpp index 1fd25658..6729b3b2 100644 --- a/icuSources/extra/uconv/uconv.cpp +++ b/icuSources/extra/uconv/uconv.cpp @@ -1,6 +1,6 @@ /***************************************************************************** * -* Copyright (C) 1999-2014, International Business Machines +* Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************/ @@ -173,7 +173,7 @@ static struct callback_ent { static const struct callback_ent *findCallback(const char *name) { int i, count = - sizeof(transcode_callbacks) / sizeof(*transcode_callbacks); + UPRV_LENGTHOF(transcode_callbacks); /* We'll do a linear search, there aren't many of them and bsearch() may not be that portable. */ @@ -944,7 +944,7 @@ ConvertFile::convertFile(const char *pname, int8_t i, length, errorLength; UErrorCode localError = U_ZERO_ERROR; - errorLength = (int8_t)UPRV_LENGTHOF(errorUChars); + errorLength = UPRV_LENGTHOF(errorUChars); ucnv_getInvalidUChars(convto, errorUChars, &errorLength, &localError); if (U_FAILURE(localError) || errorLength == 0) { // need at least 1 so that we don't access beyond the length of fromoffsets[] @@ -1082,7 +1082,7 @@ static void usage(const char *pname, int ecode) { /* Now dump callbacks and finish. */ int i, count = - sizeof(transcode_callbacks) / sizeof(*transcode_callbacks); + UPRV_LENGTHOF(transcode_callbacks); for (i = 0; i < count; ++i) { fprintf(fp, " %s", transcode_callbacks[i].name); }