struct psi_let_calloc *psi_let_calloc_init(struct psi_num_exp *nmemb,
struct psi_num_exp *size)
{
- struct psi_let_calloc *alloc = calloc(1, sizeof(*alloc));
+ struct psi_let_calloc *alloc = pecalloc(1, sizeof(*alloc), 1);
alloc->nmemb = nmemb;
alloc->size = size;
}
}
-void psi_let_calloc_dump(int fd, struct psi_let_calloc *alloc)
+void psi_let_calloc_dump(struct psi_dump *dump, struct psi_let_calloc *alloc)
{
- dprintf(fd, "calloc(");
- psi_num_exp_dump(fd, alloc->nmemb);
- dprintf(fd, ", ");
- psi_num_exp_dump(fd, alloc->size);
- dprintf(fd, ")");
+ PSI_DUMP(dump, "calloc(");
+ psi_num_exp_dump(dump, alloc->nmemb);
+ PSI_DUMP(dump, ", ");
+ psi_num_exp_dump(dump, alloc->size);
+ PSI_DUMP(dump, ")");
}