home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdlib / calloc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-29  |  249 b   |  13 lines

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. void *
  6. calloc(size_t size, size_t nelem)
  7. {
  8.   void *rv = malloc(size*nelem);
  9.   if (rv)
  10.     memset(rv, 0, size*nelem);
  11.   return rv;
  12. }
  13.