From: Pietro Cerutti Date: Mon, 23 Apr 2018 12:48:32 +0000 (+0000) Subject: Avoid naming queue heads that are not referenced by name X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95f949a92fff5d7fc57763535d522afe40ec96c3;p=neomutt Avoid naming queue heads that are not referenced by name --- diff --git a/hook.c b/hook.c index 68f450014..d7eac9504 100644 --- 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; diff --git a/mutt/charset.c b/mutt/charset.c index e01285569..1e289b5ea 100644 --- a/mutt/charset.c +++ b/mutt/charset.c @@ -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 /** diff --git a/mutt/logging.c b/mutt/logging.c index 37a8b47cf..9edbe7a19 100644 --- a/mutt/logging.c +++ b/mutt/logging.c @@ -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 */ diff --git a/mutt/logging.h b/mutt/logging.h index 243939808..e64efab18 100644 --- a/mutt/logging.h +++ b/mutt/logging.h @@ -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__) diff --git a/ncrypt/crypt_mod.c b/ncrypt/crypt_mod.c index 01b069b6d..4ae59fced 100644 --- a/ncrypt/crypt_mod.c +++ b/ncrypt/crypt_mod.c @@ -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 981b0fbe8..0ef9bdcef 100644 --- 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);