if ((hashp->tmp_buf = (char *)malloc(totlen)) == NULL)
if ((hashp->tmp_buf = (char *)malloc((size_t)totlen)) == NULL)
collect_data(	HTAB *hashp,	BUFHEAD *bufp,	int len, int set){	register uint16 *bp;	register char *p;	BUFHEAD *xbp;	uint16 save_addr;	int mylen, totlen;	p = bufp->page;	bp = (uint16 *)p;	mylen = hashp->BSIZE - bp[1];	/* if mylen ever goes negative it means that the 	 * page is screwed up.	 */	if(mylen < 0)		return (-1);	save_addr = bufp->addr;	if (bp[2] == FULL_KEY_DATA) {		/* End of Data */		totlen = len + mylen;		if (hashp->tmp_buf)			free(hashp->tmp_buf);		if ((hashp->tmp_buf = (char *)malloc(totlen)) == NULL)			return (-1);		if (set) {			hashp->cndx = 1;			if (bp[0] == 2) {	/* No more buckets in chain */				hashp->cpage = NULL;				hashp->cbucket++;			} else {				hashp->cpage =				    __get_buf(hashp, bp[bp[0] - 1], bufp, 0);				if (!hashp->cpage)					return (-1);				else if (!((uint16 *)hashp->cpage->page)[0]) {					hashp->cbucket++;					hashp->cpage = NULL;				}			}		}	} else {		xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);		if (!xbp || ((totlen =		    collect_data(hashp, xbp, len + mylen, set)) < 1))			return (-1);	}	if (bufp->addr != save_addr) {		errno = EINVAL;			/* Out of buffers. */		return (-1);	}	memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], mylen);	return (totlen);}