From: Nikolai Merinov Date: Fri, 8 Feb 2019 15:43:08 +0000 (+0300) Subject: Fix ordered comparison between pointer and zero error X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f666b7216db214d6166490442b12ed50e36199d3;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git Fix ordered comparison between pointer and zero error --- diff --git a/utils/MsgTextConvert.cpp b/utils/MsgTextConvert.cpp index ac9c994..1140dfb 100755 --- a/utils/MsgTextConvert.cpp +++ b/utils/MsgTextConvert.cpp @@ -498,7 +498,7 @@ int MsgTextConvert::convertUTF8ToUCS2(OUT unsigned char *pDestText, IN int maxLe cd = g_iconv_open("UTF16BE", "UTF8"); - if (cd > 0) { + if (cd != nullptr) { err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&unicodeTemp, (gsize*)&remainedBuffer); } @@ -645,7 +645,7 @@ int MsgTextConvert::convertUCS2ToUTF8(OUT unsigned char *pDestText, IN int maxLe cd = g_iconv_open("UTF8", "UTF16BE"); - if (cd > 0) { + if (cd != nullptr) { err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&pDestText, (gsize*)&remainedBuffer); } @@ -696,7 +696,7 @@ int MsgTextConvert::convertEUCKRToUTF8(OUT unsigned char *pDestText, IN int maxL cd = g_iconv_open("UTF8", "EUCKR"); - if (cd > 0) { + if (cd != nullptr) { err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&pDestText, (gsize*)&remainedBuffer); } @@ -746,7 +746,7 @@ int MsgTextConvert::convertSHIFTJISToUTF8(OUT unsigned char *pDestText, IN int m cd = g_iconv_open("UTF8", "SHIFT-JIS"); - if (cd > 0) { + if (cd != nullptr) { err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&pDestText, (gsize*)&remainedBuffer); }