37 |
register XAssocTable *table; /* XAssocTable to be initialized. */ |
register XAssocTable *table; /* XAssocTable to be initialized. */ |
38 |
register XAssoc *buckets; /* Pointer to the first bucket in */ |
register XAssoc *buckets; /* Pointer to the first bucket in */ |
39 |
/* the bucket array. */ |
/* the bucket array. */ |
40 |
|
|
41 |
/* Malloc the XAssocTable. */ |
/* Malloc the XAssocTable. */ |
42 |
if ((table = (XAssocTable *)malloc(sizeof(XAssocTable))) == NULL) { |
if ((table = (XAssocTable *)malloc(sizeof(XAssocTable))) == NULL) { |
43 |
/* malloc call failed! */ |
/* malloc call failed! */ |
44 |
errno = ENOMEM; |
errno = ENOMEM; |
45 |
return(NULL); |
return(NULL); |
46 |
} |
} |
47 |
|
|
48 |
/* calloc the buckets (actually just their headers). */ |
/* calloc the buckets (actually just their headers). */ |
49 |
buckets = (XAssoc *)calloc((unsigned)size, (unsigned)sizeof(XAssoc)); |
buckets = (XAssoc *)calloc((unsigned)size, (unsigned)sizeof(XAssoc)); |
50 |
if (buckets == NULL) { |
if (buckets == NULL) { |