X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=init.c;h=ab1e58318716583834a58e1863845ab3d56b4de3;hp=cb580c5be6f38b5b1cfc90b84dc6e25831470bf7;hb=b3cb6ed8d36c550a2e589910ce51bbc8352ff57c;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/init.c b/init.c index cb580c5..ab1e583 100644 --- a/init.c +++ b/init.c @@ -436,7 +436,7 @@ static int rx_from_string (struct option_t* dst, const char* val, } if (!((rx_t*) dst->data)) - *((rx_t**) dst->data) = mem_calloc (1, sizeof(rx_t)); + *((rx_t**) dst->data) = p_new(rx_t, 1); p = (rx_t*) dst->data; @@ -642,7 +642,7 @@ static void add_to_list (LIST ** list, const char *str) } if (!*list || last) { - t = (LIST *) mem_calloc (1, sizeof(LIST)); + t = p_new(LIST, 1); t->data = str_dup (str); if (last) { last->next = t; @@ -1431,7 +1431,7 @@ static int parse_alias (BUFFER * buf, BUFFER * s, unsigned long data, if (!tmp) { /* create a new alias */ - tmp = (ALIAS *) mem_calloc (1, sizeof(ALIAS)); + tmp = p_new(ALIAS, 1); tmp->self = tmp; tmp->name = str_dup (buf->data); /* give the main addressbook code a chance */ @@ -1602,7 +1602,7 @@ static void mutt_set_default(const char *name, void* p, unsigned long more) static struct option_t* add_option (const char* name, const char* init, short type, short dodup) { - struct option_t* option = mem_calloc (1, sizeof(struct option_t)); + struct option_t* option = p_new(struct option_t, 1); debug_print (1, ("adding $%s\n", name));