]> granicus.if.org Git - neomutt/commitdiff
Avoid naming queue heads that are not referenced by name
authorPietro Cerutti <gahr@gahr.ch>
Mon, 23 Apr 2018 12:48:32 +0000 (12:48 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 23 Apr 2018 23:03:20 +0000 (00:03 +0100)
hook.c
mutt/charset.c
mutt/logging.c
mutt/logging.h
ncrypt/crypt_mod.c
url.h

diff --git a/hook.c b/hook.c
index 68f450014a037b774109c128bcc09f2a10ed8c51..d7eac9504b6c29441811d2815b88262b94884db4 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -60,7 +60,7 @@ struct Hook
   struct Pattern *pattern; /**< used for fcc,save,send-hook */
   TAILQ_ENTRY(Hook) entries;
 };
-static TAILQ_HEAD(HookHead, Hook) Hooks = TAILQ_HEAD_INITIALIZER(Hooks);
+static TAILQ_HEAD(, Hook) Hooks = TAILQ_HEAD_INITIALIZER(Hooks);
 
 static int current_hook_type = 0;
 
index e012855693f96d9d9f6a5341340d3f1e4b298897..1e289b5ea4934a12f400d3e13bce993082d0c5d2 100644 (file)
@@ -73,7 +73,7 @@ struct Lookup
   char *replacement;    /**< Alternative charset to use */
   TAILQ_ENTRY(Lookup) entries;
 };
-static TAILQ_HEAD(LookupHead, Lookup) Lookups = TAILQ_HEAD_INITIALIZER(Lookups);
+static TAILQ_HEAD(, Lookup) Lookups = TAILQ_HEAD_INITIALIZER(Lookups);
 
 // clang-format off
 /**
index 37a8b47cfcb92ae0af7f5dc59de835d5d64d2eae..9edbe7a199f2768008beba4b1be00bba4781990a 100644 (file)
@@ -59,7 +59,8 @@ char *LogFileVersion = NULL; /**< Program version */
 /**
  * LogQueue - In-memory list of log lines
  */
-struct LogList LogQueue = STAILQ_HEAD_INITIALIZER(LogQueue);
+STAILQ_HEAD(, LogLine) LogQueue = STAILQ_HEAD_INITIALIZER(LogQueue);
+
 int LogQueueCount = 0; /**< Number of entries currently in the log queue */
 int LogQueueMax = 0;   /**< Maximum number of entries in the log queue */
 
index 24393980880232356e21e6432b01cfe0b59554bf..e64efab1804b9048e43704a99c2ff0eb5f84403b 100644 (file)
@@ -62,14 +62,6 @@ struct LogLine
   STAILQ_ENTRY(LogLine) entries;
 };
 
-/**
- * struct LogList - A list of log lines
- *
- * The Log is stored as a STAILQ.
- * This means that insertions are quick at the head and tail of the list.
- */
-STAILQ_HEAD(LogList, LogLine);
-
 #define mutt_debug(LEVEL, ...) MuttLogger(0, __FILE__, __LINE__, __func__, LEVEL,      __VA_ARGS__)
 #define mutt_warning(...)      MuttLogger(0, __FILE__, __LINE__, __func__, LL_WARNING, __VA_ARGS__)
 #define mutt_message(...)      MuttLogger(0, __FILE__, __LINE__, __func__, LL_MESSAGE, __VA_ARGS__)
index 01b069b6d9cfce6f7484916da195a485233ae002..4ae59fced883245acd56dcedb032cbf4349a9952 100644 (file)
@@ -41,8 +41,7 @@ struct CryptModule
   struct CryptModuleSpecs *specs;
   STAILQ_ENTRY(CryptModule) entries;
 };
-STAILQ_HEAD(CryptModules, CryptModule)
-modules = STAILQ_HEAD_INITIALIZER(modules);
+STAILQ_HEAD(, CryptModule) modules = STAILQ_HEAD_INITIALIZER(modules);
 
 /**
  * crypto_module_register - Register a new crypto module
diff --git a/url.h b/url.h
index 981b0fbe8871011cd90d8c855d29cc0cf478fa82..0ef9bdcefd8451119e0fb4ed1ddad21a1a52ad3c 100644 (file)
--- a/url.h
+++ b/url.h
@@ -56,8 +56,6 @@ enum UrlScheme
  * The arguments in a URL are saved in a linked list.
  *
  */
-
-STAILQ_HEAD(UrlQueryStringHead, UrlQueryString);
 struct UrlQueryString
 {
   char *name;
@@ -76,7 +74,7 @@ struct Url
   char *host;
   unsigned short port;
   char *path;
-  struct UrlQueryStringHead query_strings;
+  STAILQ_HEAD(, UrlQueryString) query_strings;
 };
 
 enum UrlScheme url_check_scheme(const char *s);