void *calloc_chk(size_t nmemb, size_t size, char *tag)
{
void *p;
if((p = calloc(nmemb, size)) == NULL) {
fprintf(stderr, "%s: cannot allocate memory\n", tag);
void *calloc_chk(size_t nmemb, size_t size, char *tag)
{
void *p;
if((p = calloc(nmemb, size)) == NULL) {
fprintf(stderr, "%s: cannot allocate memory\n", tag);