diff options
author | 2008-06-15 04:44:06 +0000 | |
---|---|---|
committer | 2008-06-15 04:44:06 +0000 | |
commit | 0bd60a9c00e8bbb6806fe8f5d711e5b35d547d1c (patch) | |
tree | ca839a147c656694fa8141db282b17ec774e9e30 /usr.bin/cvs | |
parent | initial import of rpc.statd, basically from NetBSD (diff) | |
download | wireguard-openbsd-0bd60a9c00e8bbb6806fe8f5d711e5b35d547d1c.tar.xz wireguard-openbsd-0bd60a9c00e8bbb6806fe8f5d711e5b35d547d1c.zip |
if we are using RCS_PARSE_FULLY we can close the RCS file descriptor
as soon as we are done parsing, since we no longer need it for anything.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/rcs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 0d022e8ed62..0d0b15415b0 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.276 2008/06/15 04:38:52 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.277 2008/06/15 04:44:06 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1663,8 +1663,11 @@ rcs_parse_init(RCSFILE *rfp) fatal("could not parse admin data"); } - if (rfp->rf_flags & RCS_PARSE_FULLY) + if (rfp->rf_flags & RCS_PARSE_FULLY) { rcs_parse_deltatexts(rfp, NULL); + (void)close(rfp->fd); + rfp->fd = -1; + } rfp->rf_flags |= RCS_SYNCED; } |