rfp->rf_head = rcsnum_alloc(); if (rfp->rf_head == NULL) {
if ((rfp->rf_head = rcsnum_parse(RCS_HEAD_INIT)) == NULL) {
rcs_open(const char *path, u_int mode){	RCSFILE *rfp;	struct stat st;	if ((stat(path, &st) == -1) && (errno == ENOENT) &&	   !(mode & RCS_MODE_WRITE)) {		cvs_log(LP_ERRNO, "cannot open RCS file `%s'", path);		return (NULL);	}	rfp = (RCSFILE *)malloc(sizeof(*rfp));	if (rfp == NULL) {		cvs_log(LP_ERRNO, "failed to allocate RCS file structure");		return (NULL);	}	memset(rfp, 0, sizeof(*rfp));	rfp->rf_head = rcsnum_alloc();	if (rfp->rf_head == NULL) {		free(rfp);		return (NULL);	}	rfp->rf_branch = rcsnum_alloc();	if (rfp->rf_branch == NULL) {		rcs_close(rfp);		return (NULL);	}	rfp->rf_path = strdup(path);	if (rfp->rf_path == NULL) {		cvs_log(LP_ERRNO, "failed to duplicate RCS file path");		rcs_close(rfp);		return (NULL);	}	rcsnum_aton(RCS_HEAD_INIT, NULL, rfp->rf_head);	rfp->rf_ref = 1;	rfp->rf_flags |= RCS_RF_SLOCK;	rfp->rf_mode = mode;	TAILQ_INIT(&(rfp->rf_delta));	TAILQ_INIT(&(rfp->rf_symbols));	TAILQ_INIT(&(rfp->rf_locks));	if (rcs_parse(rfp) < 0) {		rcs_close(rfp);		return (NULL);	}	return (rfp);}