X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fcalloc.c;h=5450b978f07a83c92e7284d5856930792d61bea9;hb=aa719ba24598c821346ea7fa68573b7bc3c0644f;hp=1e568b4303551e4467ef721d35820082612d5981;hpb=38bbee1e01ebe47c1bb31b7b263b0e717e3bfc83;p=pdclib.old diff --git a/functions/stdlib/calloc.c b/functions/stdlib/calloc.c index 1e568b4..5450b97 100644 --- a/functions/stdlib/calloc.c +++ b/functions/stdlib/calloc.c @@ -15,9 +15,11 @@ void * calloc( size_t nmemb, size_t size ) { + /* assign memory for nmemb elements of given size */ void * rc = malloc( nmemb * size ); if ( rc != NULL ) { + /* zero-initialize the memory */ memset( rc, 0, nmemb * size ); } return rc;