svtools/source/contnr/imivctl2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1412229c6e1284808b99cdcb33de99c511511b7f Author: Caolán McNamara <caol...@redhat.com> Date: Sat Oct 10 20:47:32 2015 +0100 cppcheck: redundantCopy just zero the un-overwritten new entries Change-Id: Ifea1560a1c46ac5b10c04e6499c02e29a957191a diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 16ea52f..9ca2278 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -559,9 +559,9 @@ void IcnGridMap_Impl::Expand() size_t nNewCellCount = static_cast<size_t>(nNewGridRows) * nNewGridCols; bool* pNewGridMap = new bool[nNewCellCount]; - memset(pNewGridMap, 0, nNewCellCount * sizeof(bool)); size_t nOldCellCount = static_cast<size_t>(_nGridRows) * _nGridCols; memcpy(pNewGridMap, _pGridMap, nOldCellCount * sizeof(bool)); + memset(pNewGridMap + nOldCellCount, 0, (nNewCellCount-nOldCellCount) * sizeof(bool)); delete[] _pGridMap; _pGridMap = pNewGridMap; _nGridRows = nNewGridRows;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits