]> granicus.if.org Git - neomutt/commitdiff
Simplify the API when we cannot fail
authorPietro Cerutti <gahr@gahr.ch>
Fri, 25 May 2018 11:49:43 +0000 (11:49 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 12 Dec 2018 15:10:17 +0000 (15:10 +0000)
init.c
mutt/group.c
mutt/group.h

diff --git a/init.c b/init.c
index 41b439bb7cfd6ae4b1a411d19f24648d3f668496..a45434217e18be11b23a3e5db0cf7ec9a61df79d 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1117,8 +1117,7 @@ static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data,
 
     if (data == MUTT_UNGROUP && (mutt_str_strcasecmp(buf->data, "*") == 0))
     {
-      if (mutt_group_context_clear(&gc) < 0)
-        goto bail;
+      mutt_group_context_clear(&gc);
       goto out;
     }
 
index fcfcebfcf5731d2907f6657ff5ad564b4e3342a6..70fa277fd401daf84f5cb2b57cac63861789bfb0 100644 (file)
@@ -95,9 +95,8 @@ static void group_remove(struct Group *g)
 /**
  * mutt_group_context_clear - Clear a GroupList
  * @param head GroupList to clear
- * @retval 0 Always
  */
-int mutt_group_context_clear(struct GroupList *head)
+void mutt_group_context_clear(struct GroupList *head)
 {
   struct GroupNode *np = STAILQ_FIRST(head), *next = NULL;
   while (np)
@@ -108,7 +107,6 @@ int mutt_group_context_clear(struct GroupList *head)
     np = next;
   }
   STAILQ_INIT(head);
-  return 0;
 }
 
 /**
index abf1e7b12faaeffcfa6efcecc597a103919a2afe..b3043eed7fefeccedd79488e18b032650dcd16c1 100644 (file)
@@ -64,7 +64,7 @@ int mutt_group_context_add_regex(struct GroupList *head, const char *s,
 
 bool mutt_group_match(struct Group *g, const char *s);
 
-int mutt_group_context_clear(struct GroupList *head);
+void mutt_group_context_clear(struct GroupList *head);
 int mutt_group_context_remove_regex(struct GroupList *head, const char *s);
 int mutt_group_context_remove_addrlist(struct GroupList *head, struct Address *a);