diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-04-18 21:02:51 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-04-18 21:02:51 +0000 |
commit | ec58acf815c07f4f9e34c25790a19fe026229215 (patch) | |
tree | 56e2bbc4bcfe60227a6665f4efbe18b1d8945f19 /usr.bin/cvs/status.c | |
parent | fcd7abc72887818d1c3a3765e9f0a1a29cfe306a (diff) |
Modify the CVSFILE structure using a union to keep information about
both files and directories. We can now keep the revision number for
regular files, and don't need to fetch the appropriate entry in the
command callbacks. This saves a huge amount of parsing on Entries
files.
ok joris@
Diffstat (limited to 'usr.bin/cvs/status.c')
-rw-r--r-- | usr.bin/cvs/status.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c index 91d5d5d3a54..b676a574c7b 100644 --- a/usr.bin/cvs/status.c +++ b/usr.bin/cvs/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.18 2005/04/16 20:31:18 xsa Exp $ */ +/* $OpenBSD: status.c,v 1.19 2005/04/18 21:02:50 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -116,7 +116,6 @@ cvs_status_file(CVSFILE *cfp, void *arg) int ret; char *repo, fpath[MAXPATHLEN]; RCSFILE *rf; - struct cvs_ent *entp; struct cvsroot *root; ret = 0; @@ -134,10 +133,8 @@ cvs_status_file(CVSFILE *cfp, void *arg) } cvs_file_getpath(cfp, fpath, sizeof(fpath)); - entp = cvs_ent_getent(fpath); - if ((entp != NULL) && (cvs_sendentry(root, entp) < 0)) { - cvs_ent_free(entp); + if (cvs_sendentry(root, cfp) < 0) { return (-1); } @@ -160,8 +157,6 @@ cvs_status_file(CVSFILE *cfp, void *arg) break; } - if (entp != NULL) - cvs_ent_free(entp); return (ret); } |