]> git.notmuchmail.org Git - notmuch/commitdiff
Remove some unneeded initializers.
authorCarl Worth <cworth@cworth.org>
Fri, 23 Oct 2009 21:55:50 +0000 (14:55 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 23 Oct 2009 21:55:50 +0000 (14:55 -0700)
Some people might argue for more initializers to be "safer",
but I actually prefer to leave things this way. It saves
typing, but the real benefit is that the things that do
require initialization stand out so we know to watch them
carefully. And with valgrind, we actually get to catch
errors earlier if we *don't* initialize them. So that can
be "safer" ironically enough.

notmuch.c

index d21e4f5a628d897fe5d5d013638fe841d6b37e8f..24a447970db868c55ac21904083be4d8b722ee8a 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -382,7 +382,7 @@ int
 dump_command (int argc, char *argv[])
 {
     FILE *output;
-    notmuch_database_t *notmuch = NULL;
+    notmuch_database_t *notmuch;
     notmuch_query_t *query;
     notmuch_results_t *results;
     notmuch_message_t *message;
@@ -458,7 +458,7 @@ int
 restore_command (int argc, char *argv[])
 {
     FILE *input;
-    notmuch_database_t *notmuch = NULL;
+    notmuch_database_t *notmuch;
     char *line = NULL;
     size_t line_size, line_len;
     regex_t regex;