diff options
author | krapht <krapht@cvs.openbsd.org> | 2004-11-09 20:49:18 +0000 |
---|---|---|
committer | krapht <krapht@cvs.openbsd.org> | 2004-11-09 20:49:18 +0000 |
commit | 3d554d2304f06a507e008ba768d9be331c0775a1 (patch) | |
tree | 193837447573c6b0fe71812de201a87c15963944 | |
parent | e659303031bd4f406e438e4aeac13e15b40ef7d0 (diff) |
We don't need to keep a copy of each Entries line, it isn't used
anywhere and it consumes memory uselessly.
-rw-r--r-- | usr.bin/cvs/cvs.h | 5 | ||||
-rw-r--r-- | usr.bin/cvs/entries.c | 11 |
2 files changed, 5 insertions, 11 deletions
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index f13a31933aa..aadd2b117a0 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.29 2004/08/27 15:40:44 jfb Exp $ */ +/* $OpenBSD: cvs.h,v 1.30 2004/11/09 20:49:17 krapht Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -176,7 +176,6 @@ struct cvsroot { struct cvs_ent { - char *ce_line; char *ce_buf; u_int ce_type; char *ce_name; @@ -229,6 +228,7 @@ typedef struct cvs_histfile { #ifdef CVS extern char *cvs_command; extern char *cvs_editor; +extern char *cvs_msg; extern int cvs_cmdop; extern int cvs_nocase; @@ -246,6 +246,7 @@ int cvs_commit (int, char **); int cvs_diff (int, char **); int cvs_getlog (int, char **); int cvs_history (int, char **); +int cvs_import (int, char **); int cvs_init (int, char **); int cvs_server (int, char **); int cvs_status (int, char **); diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index 744c5e77b09..4d4470e1939 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.17 2004/08/31 12:25:51 joris Exp $ */ +/* $OpenBSD: entries.c,v 1.18 2004/11/09 20:49:17 krapht Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -123,6 +123,7 @@ cvs_ent_open(const char *dir, int flags) TAILQ_INSERT_TAIL(&(ep->cef_ent), ent, ce_list); } if (ferror(fp)) { + cvs_log(LP_ERRNO, "read error on %s", entpath); cvs_ent_close(ep); return (NULL); } @@ -352,12 +353,6 @@ cvs_ent_parse(const char *entry) return (NULL); } - entp->ce_line = strdup(entry); - if (entp->ce_line == NULL) { - cvs_ent_free(entp); - return (NULL); - } - if (*fields[0] == '\0') entp->ce_type = CVS_ENT_FILE; else if (*fields[0] == 'D') @@ -389,8 +384,6 @@ cvs_ent_free(struct cvs_ent *ent) { if (ent->ce_rev != NULL) rcsnum_free(ent->ce_rev); - if (ent->ce_line != NULL) - free(ent->ce_line); if (ent->ce_buf != NULL) free(ent->ce_buf); free(ent); |