summaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/kike.c b/kike.c
index 166b541..2c79d57 100644
--- a/kike.c
+++ b/kike.c
@@ -1739,16 +1739,14 @@ struct mode_processor
struct strv *output_params; ///< Similarly for "*_params"
};
-static void
-mode_processor_init (struct mode_processor *self)
+static struct mode_processor
+mode_processor_make (void)
{
- memset (self, 0, sizeof *self);
-
- self->added = str_make ();
- self->removed = str_make ();
-
- self->added_params = strv_make ();
- self->removed_params = strv_make ();
+ return (struct mode_processor)
+ {
+ .added = str_make (), .added_params = strv_make (),
+ .removed = str_make (), .removed_params = strv_make (),
+ };
}
static void
@@ -1990,9 +1988,7 @@ static void
irc_handle_chan_mode_change
(struct client *c, struct channel *chan, char *params[])
{
- struct mode_processor p;
- mode_processor_init (&p);
-
+ struct mode_processor p = mode_processor_make ();
p.params = params;
p.channel = chan;
p.c = c;