From ec58acf815c07f4f9e34c25790a19fe026229215 Mon Sep 17 00:00:00 2001 From: Jean-Francois Brousseau Date: Mon, 18 Apr 2005 21:02:51 +0000 Subject: 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@ --- usr.bin/cvs/status.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'usr.bin/cvs/status.c') 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 * 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); } -- cgit v1.2.3