}
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;
}
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;
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 */
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));