]> granicus.if.org Git - neomutt/commitdiff
Use the enum constant to initialise
authorBertram Scharpf <software@bertram-scharpf.de>
Mon, 18 Jun 2018 07:33:19 +0000 (09:33 +0200)
committerRichard Russon <rich@flatcap.org>
Sat, 23 Jun 2018 10:36:10 +0000 (11:36 +0100)
bcache.c
mutt/address.c
mutt_notmuch.c
url.h

index 0615a72f6225470501429d37b8340b7e07b31dc1..e6b11c13700208e95ce02eb61843010732e0ccbc 100644 (file)
--- a/bcache.c
+++ b/bcache.c
@@ -58,7 +58,7 @@ struct BodyCache
 static int bcache_path(struct Account *account, const char *mailbox, char *dst, size_t dstlen)
 {
   char host[STRING];
-  struct Url url = { 0 };
+  struct Url url = { U_UNKNOWN };
   int len;
 
   if (!account || !MessageCachedir || !*MessageCachedir || !dst || (dstlen == 0))
index d9c04324cf195e12b27c258ff8ab1e2666a3cd54..12c1a4431885895bf0035cef842e4219a7d9eebf 100644 (file)
@@ -989,8 +989,6 @@ const char *mutt_addr_for_display(struct Address *a)
   static char *buf = NULL;
   char *local_mailbox = NULL;
 
-  FREE(&buf);
-
   if (!a->mailbox || mutt_addr_is_local(a))
     return a->mailbox;
 
index 4c4bfe5d2ed8fb830d14219df28358b9c59d0511..d44bda43f5ecfbc8296014a047979594a65b24fd 100644 (file)
@@ -2173,7 +2173,7 @@ int nm_update_filename(struct Context *ctx, const char *old, const char *new,
 int nm_nonctx_get_count(char *path, int *all, int *new)
 {
   struct UrlQueryString *item = NULL;
-  struct Url url = { 0 };
+  struct Url url = { U_UNKNOWN };
   char *url_holder = mutt_str_strdup(path);
   char *db_filename = NULL, *db_query = NULL;
   notmuch_database_t *db = NULL;
diff --git a/url.h b/url.h
index 0ef9bdcefd8451119e0fb4ed1ddad21a1a52ad3c..5ebb71f81806c8f87ced3ea2cc6bcfc2666d9470 100644 (file)
--- a/url.h
+++ b/url.h
@@ -31,6 +31,7 @@ struct Envelope;
  */
 enum UrlScheme
 {
+  U_UNKNOWN,
   U_FILE,
   U_POP,
   U_POPS,
@@ -42,9 +43,8 @@ enum UrlScheme
   U_SMTPS,
   U_MAILTO,
 #ifdef USE_NOTMUCH
-  U_NOTMUCH,
+  U_NOTMUCH
 #endif
-  U_UNKNOWN
 };
 
 #define U_DECODE_PASSWD (1 << 0)