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


Riccardo Magliocchetti wrote
Il 24/12/2012 15:45, julien2412 ha scritto:
diff --git a/sal/typesconfig/typesconfig.c
b/sal/typesconfig/typesconfig.c
index 473f07a..ef52c5f 100644
--- a/sal/typesconfig/typesconfig.c
+++ b/sal/typesconfig/typesconfig.c
@@ -262,11 +262,9 @@ int GetAlignment( Type eT )
  {
    char  a[ 16*8 ];
    long  p = (long)(void*)a;
-  int   i;

    /* clear a[...] to set legal value for double access */
-  for ( i = 0; i<  16*8; i++ )
-    a[i] = 0;
+  memset(a, 0, sizeof(a));

    p = ( p + 0xF )&  ~0xF;
    for ( i = 1; i<  16; i++ )

Would it be ok?

makes sense to me, but id doesn't look you have compiled it, you are 
removing i that is used later :)

Obviously I should have compiled it :-)
Ok for the rest.

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/PATCH-Replace-loop-by-memset-in-sal-typesconfig-typesconfig-c-tp4026017p4026029.html
Sent from the Dev mailing list archive at Nabble.com.

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.