Point out that the file_struct in log_delete is zero-initialized
authorMatt McCutchen <matt@mattmccutchen.net>
Wed, 10 Feb 2010 03:13:28 +0000 (22:13 -0500)
committerWayne Davison <wayned@samba.org>
Sat, 24 Apr 2010 16:51:05 +0000 (09:51 -0700)
because it is static.

It took me long enough to realize this that I think it is worth
documenting.

log.c

diff --git a/log.c b/log.c
index 6f68f56..0f6f90c 100644 (file)
--- a/log.c
+++ b/log.c
@@ -853,7 +853,7 @@ void log_delete(const char *fname, int mode)
        static struct {
                union file_extras ex[4]; /* just in case... */
                struct file_struct file;
-       } x;
+       } x; /* Zero-initialized due to static declaration. */
        int len = strlen(fname);
        const char *fmt;