threads / patch / 17777

patchRemove redundant bit clears from diff_setup()

Subject: [PATCH] Remove redundant bit clears from diff_setup()

## tl;dr

One message between Feb 13, 2009 and Feb 13, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Keith Cascio· Feb 13, 2009, 17:33 UTC · lore
All bits already clear after memset(0).
---
 diff.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Show changes to diff.c +0 −3
diff --git a/diff.c b/diff.c
index be3859e..006aa01 100644
--- a/diff.c
+++ b/diff.c
@@ -2319,29 +2319,26 @@ static void run_checkdiff(struct diff_filepair *p, struct diff_options *o)
 void diff_setup(struct diff_options *options)
 {
 	memset(options, 0, sizeof(*options));
 
 	options->file = stdout;
 
 	options->line_termination = '\n';
 	options->break_opt = -1;
 	options->rename_limit = -1;
 	options->dirstat_percent = 3;
-	DIFF_OPT_CLR(options, DIRSTAT_CUMULATIVE);
 	options->context = 3;
 
 	options->change = diff_change;
 	options->add_remove = diff_addremove;
 	if (diff_use_color_default > 0)
 		DIFF_OPT_SET(options, COLOR_DIFF);
-	else
-		DIFF_OPT_CLR(options, COLOR_DIFF);
 	options->detect_rename = diff_detect_rename_default;
 
 	if (!diff_mnemonic_prefix) {
 		options->a_prefix = "a/";
 		options->b_prefix = "b/";
 	}
 }
 
 int diff_setup_done(struct diff_options *options)
 {
-- 
1.6.1

← back to recent threads