]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Let the compiler zero initialiase all the members
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>
Thu, 18 Mar 2010 11:41:13 +0000 (12:41 +0100)
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>
Thu, 18 Mar 2010 11:41:13 +0000 (12:41 +0100)
mdfour.c

index f156153c1a9ebbd58eb92c1c38606fc272dbb434..dba49fcece7c46571d0121aef92a4285f64f0522 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -112,7 +112,7 @@ void mdfour_begin(struct mdfour *md)
 
 static void mdfour_tail(const unsigned char *in, size_t n)
 {
-       unsigned char buf[128];
+       unsigned char buf[128] = { 0 };
        uint32_t M[16];
        uint32_t b;
 
@@ -120,7 +120,6 @@ static void mdfour_tail(const unsigned char *in, size_t n)
 
        b = m->totalN * 8;
 
-       memset(buf, 0, 128);
        if (n) memcpy(buf, in, n);
        buf[n] = 0x80;