summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-04-13 16:10:30 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-04-13 16:10:30 +0000
commitd2336b812c8cd53e6fa365b565a0f7c44a88a0f1 (patch)
treee12a162cab6a50e371a3d0aaa2df16c90d6a5ecc
parent4df9fec3aa1ac418d17d5ad5816be644f620e157 (diff)
clean up temporary files when we finish running.
"cool" niallo@
-rw-r--r--usr.bin/rcs/ci.c4
-rw-r--r--usr.bin/rcs/rcsdiff.c6
-rw-r--r--usr.bin/rcs/rcsprog.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 09fe68faacc..b3923efeb21 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.143 2006/04/13 13:15:18 niallo Exp $ */
+/* $OpenBSD: ci.c,v 1.144 2006/04/13 16:10:29 joris Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -358,8 +358,6 @@ checkin_diff_file(struct checkin_params *pb)
b3 = NULL;
out:
- cvs_worklist_run(&rcs_temp_files, cvs_worklist_unlink);
-
if (b1 != NULL)
cvs_buf_free(b1);
if (b2 != NULL)
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index 4c6cabbb204..1bca7f4487c 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.47 2006/04/13 00:58:25 ray Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.48 2006/04/13 16:10:29 joris Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -237,8 +237,6 @@ rcsdiff_file(RCSFILE *file, RCSNUM *rev, const char *filename)
ret = 0;
out:
- cvs_worklist_run(&rcs_temp_files, cvs_worklist_unlink);
-
if (b1 != NULL)
cvs_buf_free(b1);
if (b2 != NULL)
@@ -314,8 +312,6 @@ rcsdiff_rev(RCSFILE *file, RCSNUM *rev1, RCSNUM *rev2)
ret = 0;
out:
- cvs_worklist_run(&rcs_temp_files, cvs_worklist_unlink);
-
if (b1 != NULL)
cvs_buf_free(b1);
if (b2 != NULL)
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 842d9bbe4a8..4dec4f791f6 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.99 2006/04/13 00:58:25 ray Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.100 2006/04/13 16:10:29 joris Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -452,6 +452,9 @@ main(int argc, char **argv)
break;
}
+ /* clean up temporary files */
+ cvs_worklist_run(&rcs_temp_files, cvs_worklist_unlink);
+
exit(ret);
/* NOTREACHED */
}