git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Remove redundant bit clears from diff_setup()

From
Keith Cascio <keith@cs.ucla.edu>
Date
Feb 13, 2009, 17:33 UTC
Message-ID
<1234546414-4416-1-git-send-email-keith@cs.ucla.edu>
All bits already clear after memset(0).
---
 diff.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
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
Message 1 of 1 in “Remove redundant bit clears from diff_setup()”
  1. Remove redundant bit clears from diff_setup()Keith Cascio, Feb 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.