/* Create duplicate of ha structure */ static struct ast_ha *ast_duplicate_ha(struct ast_ha *original) { struct ast_ha *new_ha = malloc(sizeof(struct ast_ha)); /* Copy from original to new object */ ast_copy_ha(original, new_ha); return(new_ha); }
/* Create duplicate of ha structure */ static struct ast_ha *ast_duplicate_ha(struct ast_ha *original) { struct ast_ha *new_ha; if ((new_ha = ast_malloc(sizeof(*new_ha)))) { /* Copy from original to new object */ ast_copy_ha(original, new_ha); } return new_ha; }