зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1587905 - Remove useless variable 'bytesAllocated' declaration & assignation r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D48888 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5f2a4a2274
Коммит
d31a8b68f3
|
@ -2901,10 +2901,9 @@ static nsresult ReadSourceFromFilename(JSContext* cx, const char* filename,
|
|||
ptr += bytesRead;
|
||||
}
|
||||
|
||||
size_t bytesAllocated;
|
||||
if (utf8Source) {
|
||||
// |buf| is already UTF-8, so we can directly return it.
|
||||
*len = bytesAllocated = rawLen;
|
||||
*len = rawLen;
|
||||
*utf8Source = buf.release();
|
||||
} else {
|
||||
MOZ_ASSERT(twoByteSource != nullptr);
|
||||
|
@ -2920,8 +2919,6 @@ static nsresult ReadSourceFromFilename(JSContext* cx, const char* filename,
|
|||
if (!*twoByteSource) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
bytesAllocated = *len * sizeof(char16_t);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче