1 /* $NetBSD: calloc.c,v 1.1 2006/04/07 14:21:29 cherry Exp $ */ 2 3 #include <sys/cdefs.h> 4 #include <sys/types.h> 5 6 #include <lib/libsa/stand.h> 7 8 void * 9 calloc(u_int size1, u_int size2) 10 { 11 u_int total_size = size1 * size2; 12 void *ptr; 13 14 if(( (ptr = alloc(total_size)) != NULL)) { 15 bzero(ptr, total_size); 16 } 17 18 /* alloc will crib for me. */ 19 20 return(ptr); 21 } 22