From: Matt McCutchen Date: Wed, 10 Feb 2010 03:13:28 +0000 (-0500) Subject: Point out that the file_struct in log_delete is zero-initialized X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/be8234cd5991b395ed2d2a20b9e40bbcd021a70d?ds=sidebyside Point out that the file_struct in log_delete is zero-initialized because it is static. It took me long enough to realize this that I think it is worth documenting. --- diff --git a/log.c b/log.c index 6f68f569..0f6f90cb 100644 --- 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;