[PATCH] - avoid a memset
Marion & Christophe JAILLET
christophe.jaillet at wanadoo.fr
Tue Jun 12 13:53:45 PDT 2012
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120612/6c6b5fa9/attachment.htm>
-------------- next part --------------
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));
}
/**
More information about the LibreOffice
mailing list