Point out that the file_struct in log_delete is zero-initialized because
authorMatt McCutchen <matt@mattmccutchen.net>
Wed, 10 Feb 2010 03:13:28 +0000 (22:13 -0500)
committerMatt McCutchen <matt@mattmccutchen.net>
Sat, 25 Jun 2011 22:28:04 +0000 (18:28 -0400)
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 f842e55..46e0a63 100644 (file)
--- a/log.c
+++ b/log.c
@@ -848,6 +848,7 @@ void maybe_log_item(struct file_struct *file, int iflags, int itemizing,
 
 void log_delete(const char *fname, int mode)
 {
+       /* Zero-initialized */
        static struct {
                union file_extras ex[4]; /* just in case... */
                struct file_struct file;