diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-06-14 14:10:51 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-06-14 14:10:51 +0000 |
commit | 53c3e011c0e9b0a02a8c7ae04ba37fb4b2286574 (patch) | |
tree | f2297476a16d8c4c3f2b689b054e7d894174d98b /usr.bin/cvs/file.c | |
parent | a160bec77bb30d38663d833116b460595af2b9c8 (diff) |
add cvs_buf_load_fd() which does the same as cvs_buf_load()
except it takes a decriptor as argument instead of a path.
modified cvs_buf_load() to open the descriptor then pass
it to cvs_buf_load_fd().
change all the calls to cvs_buf_load() that have a descriptor
open for the path to cvs_buf_load_fd() to prevent races.
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r-- | usr.bin/cvs/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index b679e3466b0..6fb4a065093 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.158 2006/06/03 19:07:13 joris Exp $ */ +/* $OpenBSD: file.c,v 1.159 2006/06/14 14:10:50 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -674,8 +674,7 @@ cvs_file_classify(struct cvs_file *cf, const char *tag, int loud) b1 = rcs_kwexp_buf(b1, cf->file_rcs, cf->file_rcsrev); - /* XXX */ - b2 = cvs_buf_load(cf->file_path, BUF_AUTOEXT); + b2 = cvs_buf_load_fd(cf->fd, BUF_AUTOEXT); if (b2 == NULL) fatal("failed to get file content for comparison"); |