summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/diff
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-10-02 06:43:58 +0000
committerpeter <peter@FreeBSD.org>2000-10-02 06:43:58 +0000
commita152a7ef82d848279559ecbca83c547e47aa8c9d (patch)
treeccd783be8562c7bf052885106d7a3efd32f7be0c /contrib/cvs/diff
parente0aa09eb3434450a9aec24a6f4b2694077991e45 (diff)
downloadFreeBSD-src-a152a7ef82d848279559ecbca83c547e47aa8c9d.zip
FreeBSD-src-a152a7ef82d848279559ecbca83c547e47aa8c9d.tar.gz
Merge changes from 1.10.7 -> 1.11 into mainline. Note that the old
anoncvs no-password hack is gone and is replaced by the official version.
Diffstat (limited to 'contrib/cvs/diff')
-rw-r--r--contrib/cvs/diff/diff3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/cvs/diff/diff3.c b/contrib/cvs/diff/diff3.c
index c2997e9..ab68eaf 100644
--- a/contrib/cvs/diff/diff3.c
+++ b/contrib/cvs/diff/diff3.c
@@ -44,6 +44,8 @@ void printf_output PARAMS((char const *, ...))
;
void flush_output PARAMS((void));
+char * cvs_temp_name PARAMS((void));
+
/*
* Internal data structures and macros for the diff3 program; includes
* data structures for both diff3 diffs and normal diffs.
@@ -478,8 +480,6 @@ diff3_run (argc, argv, out, callbacks_arg)
free(content0);
free(content1);
- free_diff_blocks(thread0);
- free_diff_blocks(thread1);
free_diff3_blocks(diff3);
if (! callbacks || ! callbacks->write_output)
@@ -679,7 +679,7 @@ make_3way_diff (thread0, thread1)
struct diff3_block const *last_diff3;
- static struct diff3_block const zero_diff3;
+ static struct diff3_block const zero_diff3 = { 0 };
/* Initialization */
result = 0;
@@ -768,6 +768,8 @@ make_3way_diff (thread0, thread1)
tmpblock = using_to_diff3_block (using, last_using,
base_water_thread, high_water_thread,
last_diff3);
+ free_diff_blocks(using[0]);
+ free_diff_blocks(using[1]);
if (!tmpblock)
diff3_fatal ("internal error: screwup in format of diff blocks");
@@ -1277,7 +1279,7 @@ read_diff (filea, fileb, output_placement)
*ap++ = fileb;
*ap = 0;
- diffout = (char *)cvs_temp_name();
+ diffout = cvs_temp_name ();
outfile_hold = outfile;
callbacks_hold = callbacks;
OpenPOWER on IntegriCloud