Bug 1278156 - Remove useless null check in xp_iconv(). r=froydnj.

aOutputLeft is null checked and then dereferenced twice more in this function,
and all callers pass a non-null pointer. So just remove the null check.

--HG--
extra : rebase_source : 8190a51fde8434ac346a4e23db5ed4703762778c
This commit is contained in:
Nicholas Nethercote 2016-06-03 14:59:16 +10:00
parent 574fdad7e2
commit f0f5072443

View File

@ -124,7 +124,7 @@ xp_iconv(iconv_t converter,
const char** aInput, size_t* aInputLeft, const char** aInput, size_t* aInputLeft,
char** aOutput, size_t* aOutputLeft) char** aOutput, size_t* aOutputLeft)
{ {
size_t res, outputAvail = aOutputLeft ? *aOutputLeft : 0; size_t res, outputAvail = *aOutputLeft;
res = iconv(converter, ICONV_INPUT(aInput), aInputLeft, aOutput, aOutputLeft); res = iconv(converter, ICONV_INPUT(aInput), aInputLeft, aOutput, aOutputLeft);
if (res == (size_t)-1) { if (res == (size_t)-1) {
// on some platforms (e.g., linux) iconv will fail with // on some platforms (e.g., linux) iconv will fail with