ASSERT(memMappedData);
udata_setCommonData(memMappedData, &uerr);
- if (uerr != U_ZERO_ERROR) {
+ if (U_FAILURE(uerr)) {
UnmapViewOfFile(memMappedData);
goto exit;
}
udata_setAppData(ICU_DATA_ITEM, memMappedData, &uerr);
- if (uerr != U_ZERO_ERROR) {
+ if (U_FAILURE(uerr)) {
UnmapViewOfFile(memMappedData);
goto exit;
}
uerr = U_ZERO_ERROR;
ucnv_setToUCallBack(cvin, toUCb, NULL, NULL, NULL, &uerr);
- if (U_ZERO_ERROR != uerr) {
+ if (U_FAILURE(uerr)) {
goto exit;
}
uerr = U_ZERO_ERROR;
ucnv_setFromUCallBack(cvout, fromUCb, NULL, NULL, NULL, &uerr);
- if (U_ZERO_ERROR != uerr) {
+ if (U_FAILURE(uerr)) {
goto exit;
}
bufPiv, &bufPivSource, &bufPivTarget, bufPivEnd,
FALSE, TRUE, &uerr);
- if (!U_FAILURE(uerr)) {
+ if (U_SUCCESS(uerr)) {
/*
* "This was a triumph. I'm making a note here: HUGE SUCCESS. It's
* hard to overstate my satisfaction."
Bool
CodeSet_Validate(const char *buf, // IN: the string
- size_t size, // IN: length of string
+ size_t size, // IN: length of string
const char *code) // IN: encoding
{
#if defined(NO_ICU)
uerr = U_ZERO_ERROR;
cv = ucnv_open(code, &uerr);
- VERIFY(uerr == U_ZERO_ERROR);
+ VERIFY(U_SUCCESS(uerr));
ucnv_setToUCallBack(cv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &uerr);
- VERIFY(uerr == U_ZERO_ERROR);
+ VERIFY(U_SUCCESS(uerr));
ucnv_toUChars(cv, NULL, 0, buf, size, &uerr);
ucnv_close(cv);