No explicit initialization necessary for a zero blob
authorVolker Lendecke <vl@samba.org>
Sat, 25 Jul 2009 16:56:06 +0000 (12:56 -0400)
committerVolker Lendecke <vl@samba.org>
Sat, 25 Jul 2009 16:59:21 +0000 (12:59 -0400)
lib/util/util.c

index 29b47f5858f685cb870e98d861af357a7cc47c7b..f49d25865c5978756fbca063bc4b74314633a688 100644 (file)
@@ -265,15 +265,13 @@ static void _dump_data(int level, const uint8_t *buf, int len,
                       bool omit_zero_bytes)
 {
        int i=0;
-       const uint8_t empty[16];
+       static const uint8_t empty[16] = { 0, };
        bool skipped = false;
 
        if (len<=0) return;
 
        if (!DEBUGLVL(level)) return;
 
-       memset(&empty, '\0', 16);
-
        for (i=0;i<len;) {
 
                if (i%16 == 0) {