nickserv/multimark: fix assertion failure
The code behaved fine anyway because the assertion failure could only
happen in cases where the returned pointer from multimark_list was
unused.
[msg(nickserv)] mark testacct01 list
-!- WALLOP svs.: (multimark.c:192 multimark_list): warning: assertion 'mu != ((void *)0)' failed.
-NickServ(-@.)- testacct01 is not registered anymore but was marked by ilbelkyr on Jul 29 01:49:37 2016 +0000: foo
Janik Kleinhoff
7 years ago
878 | 878 | return; |
879 | 879 | } |
880 | 880 | |
881 | l = multimark_list(mu); | |
882 | ||
883 | 881 | if (!strcasecmp(action, "ADD")) |
884 | 882 | { |
885 | 883 | if (!info) |
888 | 886 | command_fail(si, fault_needmoreparams, _("Usage: MARK <target> ADD <note>")); |
889 | 887 | return; |
890 | 888 | } |
889 | ||
890 | l = multimark_list(mu); | |
891 | 891 | |
892 | 892 | mm = smalloc(sizeof(multimark_t)); |
893 | 893 | mm->setter_uid = sstrdup(entity(si->smu)->id); |
960 | 960 | } |
961 | 961 | |
962 | 962 | command_success_nodata(si, _("\2%s\2's marks:"), target); |
963 | ||
964 | l = multimark_list(mu); | |
963 | 965 | |
964 | 966 | MOWGLI_ITER_FOREACH(n, l->head) |
965 | 967 | { |
1082 | 1084 | bool found = false; |
1083 | 1085 | int num = atoi(info); |
1084 | 1086 | |
1087 | l = multimark_list(mu); | |
1088 | ||
1085 | 1089 | MOWGLI_ITER_FOREACH(n, l->head) |
1086 | 1090 | { |
1087 | 1091 | mm = n->data; |