mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
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:
parent
574fdad7e2
commit
f0f5072443
@ -124,7 +124,7 @@ xp_iconv(iconv_t converter,
|
||||
const char** aInput, size_t* aInputLeft,
|
||||
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);
|
||||
if (res == (size_t)-1) {
|
||||
// on some platforms (e.g., linux) iconv will fail with
|
||||
|
Loading…
Reference in New Issue
Block a user