cvs_log(LP_ERRNO, "failed to allocate RCSNUM");
rcs_errno = RCS_ERR_ERRNO;
rcsnum_aton(const char *str, char **ep, RCSNUM *nump){	u_int32_t val;	const char *sp;	void *tmp;	if (nump->rn_id == NULL) {		nump->rn_id = (u_int16_t *)malloc(sizeof(u_int16_t));		if (nump->rn_id == NULL) {			cvs_log(LP_ERRNO, "failed to allocate RCSNUM");			return (-1);		}	}	nump->rn_len = 0;	nump->rn_id[0] = 0;	for (sp = str;; sp++) {		if (!isdigit(*sp) && (*sp != '.'))			break;		if (*sp == '.') {			if (nump->rn_len >= RCSNUM_MAXLEN - 1) {				cvs_log(LP_ERR,				    "RCSNUM exceeds maximum length");				goto rcsnum_aton_failed;			}			nump->rn_len++;			tmp = realloc(nump->rn_id,			    (nump->rn_len + 1) * sizeof(u_int16_t));			if (tmp == NULL)				goto rcsnum_aton_failed;			nump->rn_id = (u_int16_t *)tmp;			nump->rn_id[nump->rn_len] = 0;			continue;		}		val = (nump->rn_id[nump->rn_len] * 10) + (*sp - 0x30);		if (val > RCSNUM_MAXNUM) {			cvs_log(LP_ERR, "RCSNUM overflow");			goto rcsnum_aton_failed;		}		nump->rn_id[nump->rn_len] = val;	}	if (ep != NULL)		*(const char **)ep = sp;	nump->rn_len++;	return (nump->rn_len);rcsnum_aton_failed:	nump->rn_len = 0;	free(nump->rn_id);	nump->rn_id = NULL;	return (-1);}