]> granicus.if.org Git - neomutt/commitdiff
More idiomatic definition of HookHead
authorPietro Cerutti <gahr@gahr.ch>
Tue, 25 Jul 2017 19:58:18 +0000 (19:58 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 5 Aug 2017 17:55:23 +0000 (18:55 +0100)
Issue #374

hook.c

diff --git a/hook.c b/hook.c
index 4810dcf53d3096307f8b40c8737b6315e5534c05..a361794f17ea2a31715af8e68e08d322bbb268c8 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -50,7 +50,7 @@
 /**
  * struct Hook - A list of user hooks
  */
-TAILQ_HEAD(HookHead, Hook);
+static TAILQ_HEAD(HookHead, Hook) Hooks = TAILQ_HEAD_INITIALIZER(Hooks);
 struct Hook
 {
   int type;                /**< hook type */
@@ -60,8 +60,6 @@ struct Hook
   TAILQ_ENTRY(Hook) entries;
 };
 
-static struct HookHead Hooks = TAILQ_HEAD_INITIALIZER(Hooks);
-
 static int current_hook_type = 0;
 
 int mutt_parse_hook(struct Buffer *buf, struct Buffer *s, unsigned long data,