version 1.14, 2004/12/28 21:58:42 |
version 1.15, 2005/02/17 16:09:03 |
|
|
return (NULL); |
return (NULL); |
} |
} |
memset(root, 0, sizeof(*root)); |
memset(root, 0, sizeof(*root)); |
root->cr_ref = 2; |
root->cr_ref = 1; |
root->cr_method = CVS_METHOD_NONE; |
root->cr_method = CVS_METHOD_NONE; |
CVS_RSTVR(root); |
CVS_RSTVR(root); |
|
|
|
|
|
|
/* add to the cache */ |
/* add to the cache */ |
tmp = realloc(cvs_rcache, (cvs_rcsz + 1) * sizeof(struct cvsroot *)); |
tmp = realloc(cvs_rcache, (cvs_rcsz + 1) * sizeof(struct cvsroot *)); |
if (tmp == NULL) { |
if (tmp != NULL) { |
/* just forget about the cache and return anyways */ |
|
root->cr_ref--; |
|
} else { |
|
cvs_rcache = (struct cvsroot **)tmp; |
cvs_rcache = (struct cvsroot **)tmp; |
cvs_rcache[cvs_rcsz++] = root; |
cvs_rcache[cvs_rcsz++] = root; |
|
root->cr_ref++; |
} |
} |
|
|
return (root); |
return (root); |