/*****************************************************************************
*
-* Copyright (C) 1999-2014, International Business Machines
+* Copyright (C) 1999-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************/
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. */
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[]
/* 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);
}