Bug 1158772 - fix non-idiomatic memset call in nsDeque.cpp; r=erahm

Coverty complains that we're using sizeof(mData) here instead of
sizeof(*mData).  They're equivalent for all the architectures we care about,
but go ahead and tidy up the syntax to silence the static analyzer.
This commit is contained in:
Nathan Froyd 2015-04-27 07:55:32 -04:00
parent 08c48e40ef
commit 050302155b

View File

@ -135,7 +135,7 @@ void
nsDeque::Empty()
{
if (mSize && mData) {
memset(mData, 0, mCapacity * sizeof(mData));
memset(mData, 0, mCapacity * sizeof(*mData));
}
mSize = 0;
mOrigin = 0;