*/
void mutt_grouplist_clear(struct GroupList *head)
{
+ if (!head)
+ return;
+
struct GroupNode *np = STAILQ_FIRST(head), *next = NULL;
while (np)
{
*/
void mutt_grouplist_add(struct GroupList *head, struct Group *group)
{
+ if (!head || !group)
+ return;
+
struct GroupNode *np = NULL;
STAILQ_FOREACH(np, head, entries)
{
*/
void mutt_grouplist_destroy(struct GroupList *head)
{
+ if (!head)
+ return;
+
struct GroupNode *np = STAILQ_FIRST(head), *next = NULL;
while (np)
{
*/
static void group_add_addrlist(struct Group *g, struct Address *a)
{
- struct Address **p = NULL, *q = NULL;
-
- if (!g)
- return;
- if (!a)
+ if (!g || !a)
return;
+ struct Address **p = NULL, *q = NULL;
+
for (p = &g->as; *p; p = &((*p)->next))
;
*/
void mutt_grouplist_add_addrlist(struct GroupList *head, struct Address *a)
{
+ if (!head || !a)
+ return;
+
struct GroupNode *np = NULL;
STAILQ_FOREACH(np, head, entries)
{
*/
int mutt_grouplist_remove_addrlist(struct GroupList *head, struct Address *a)
{
+ if (!head || !a)
+ return -1;
+
int rc = 0;
struct GroupNode *np = NULL;
int mutt_grouplist_add_regex(struct GroupList *head, const char *s, int flags,
struct Buffer *err)
{
+ if (!head || !s)
+ return -1;
+
int rc = 0;
struct GroupNode *np = NULL;
*/
int mutt_grouplist_remove_regex(struct GroupList *head, const char *s)
{
+ if (!head || !s)
+ return -1;
+
int rc = 0;
struct GroupNode *np = NULL;
STAILQ_FOREACH(np, head, entries)