Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

first try to send a patch for libreoffice,

Has nothing much is explained on http://www.libreoffice.org/developers-2/, please feel free to tell me how to improve my submissions.


This one, is to avoid a call to memset(..., 0, ...) for memory allocated with calloc.


Best regards
Christophe JAILLET
<http://lists.freedesktop.org/mailman/listinfo/libreoffice>
diff --git a/i18npool/source/breakiterator/breakiterator_ctl.cxx 
b/i18npool/source/breakiterator/breakiterator_ctl.cxx
index 70a3124..5d1d7a1 100644
--- a/i18npool/source/breakiterator/breakiterator_ctl.cxx
+++ b/i18npool/source/breakiterator/breakiterator_ctl.cxx
@@ -51,7 +51,6 @@ BreakIterator_CTL::BreakIterator_CTL() :
     // to improve performance, alloc big enough memory in construct.
     nextCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32));
     previousCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32));
-    memset(nextCellIndex, 0, cellIndexSize * sizeof(sal_Int32));
 }
 
 /**

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.