--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id E8A466DE0B64\r
+ for <notmuch@notmuchmail.org>; Fri, 25 Sep 2015 12:19:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.785\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.785 tagged_above=-999 required=5 tests=[AWL=0.133, \r
+ SPF_NEUTRAL=0.652] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id zBu9vWhDHxfN for <notmuch@notmuchmail.org>;\r
+ Fri, 25 Sep 2015 12:19:33 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 7EF246DE02D2\r
+ for <notmuch@notmuchmail.org>; Fri, 25 Sep 2015 12:19:33 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id B0FB010008D;\r
+ Fri, 25 Sep 2015 22:19:38 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] cli: use designated initializer to initialize\r
+ add_files_state\r
+In-Reply-To: <1443206855-21701-1-git-send-email-jani@nikula.org>\r
+References: <1443206855-21701-1-git-send-email-jani@nikula.org>\r
+User-Agent: Notmuch/0.20.2+68~g0c35549 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Fri, 25 Sep 2015 22:19:38 +0300\r
+Message-ID: <m2mvwamhmd.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 25 Sep 2015 19:19:36 -0000\r
+\r
+On Fri, Sep 25 2015, Jani Nikula <jani@nikula.org> wrote:\r
+\r
+> The side effect is that all of add_files_state will be initialized to\r
+> zero, removing any lingering doubt that some of it might not be\r
+> initialized. It's not a small struct, and the initialization is\r
+> scattered around a bit, so this makes the code more readable.\r
+\r
+LGTM. Should I test ? ;/\r
+\r
+Tomi\r
+\r
+\r
+> ---\r
+> notmuch-new.c | 13 +++++--------\r
+> 1 file changed, 5 insertions(+), 8 deletions(-)\r
+>\r
+> diff --git a/notmuch-new.c b/notmuch-new.c\r
+> index 33645349cd5f..442a2f0ae288 100644\r
+> --- a/notmuch-new.c\r
+> +++ b/notmuch-new.c\r
+> @@ -933,7 +933,11 @@ int\r
+> notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
+> {\r
+> notmuch_database_t *notmuch;\r
+> - add_files_state_t add_files_state;\r
+> + add_files_state_t add_files_state = {\r
+> + .verbosity = VERBOSITY_NORMAL,\r
+> + .debug = FALSE,\r
+> + .output_is_a_tty = isatty (fileno (stdout)),\r
+> + };\r
+> struct timeval tv_start;\r
+> int ret = 0;\r
+> struct stat st;\r
+> @@ -948,10 +952,6 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
+> notmuch_bool_t quiet = FALSE, verbose = FALSE;\r
+> notmuch_status_t status;\r
+> \r
+> - add_files_state.verbosity = VERBOSITY_NORMAL;\r
+> - add_files_state.debug = FALSE;\r
+> - add_files_state.output_is_a_tty = isatty (fileno (stdout));\r
+> -\r
+> notmuch_opt_desc_t options[] = {\r
+> { NOTMUCH_OPT_BOOLEAN, &quiet, "quiet", 'q', 0 },\r
+> { NOTMUCH_OPT_BOOLEAN, &verbose, "verbose", 'v', 0 },\r
+> @@ -1086,9 +1086,6 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])\r
+> talloc_free (dot_notmuch_path);\r
+> dot_notmuch_path = NULL;\r
+> \r
+> - add_files_state.processed_files = 0;\r
+> - add_files_state.added_messages = 0;\r
+> - add_files_state.removed_messages = add_files_state.renamed_messages = 0;\r
+> gettimeofday (&add_files_state.tv_start, NULL);\r
+> \r
+> add_files_state.removed_files = _filename_list_create (config);\r
+> -- \r
+> 2.1.4\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r