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

[PATCH 2/2] diffcore-pickaxe: fill_one() doesn't modify textconv

From
Simon Ruderich <simon@ruderich.org>
Date
Apr 4, 2013, 16:05 UTC
Message-ID
<20130404160557.GB25232@ruderich.org>
In-Reply-To
<472ae7e08eedfef5886d0ace935654876091447d.1365090893.git.simon@ruderich.org>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
---
 diffcore-pickaxe.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index f814a52..c378ea0 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -75,10 +75,10 @@ static void diffgrep_consume(void *priv, char *line, unsigned long len)
 }
 
 static void fill_one(struct diff_filespec *one,
-		     mmfile_t *mf, struct userdiff_driver **textconv)
+		     mmfile_t *mf, struct userdiff_driver *textconv)
 {
 	if (DIFF_FILE_VALID(one)) {
-		mf->size = fill_textconv(*textconv, one, &mf->ptr);
+		mf->size = fill_textconv(textconv, one, &mf->ptr);
 	} else {
 		memset(mf, 0, sizeof(*mf));
 	}
@@ -101,8 +101,8 @@ static int diff_grep(struct diff_filepair *p, struct diff_options *o,
 		textconv_two = get_textconv(p->two);
 	}
 
-	fill_one(p->one, &mf1, &textconv_one);
-	fill_one(p->two, &mf2, &textconv_two);
+	fill_one(p->one, &mf1, textconv_one);
+	fill_one(p->two, &mf2, textconv_two);
 
 	if (!mf1.ptr) {
 		if (!mf2.ptr)
@@ -228,8 +228,8 @@ static int has_changes(struct diff_filepair *p, struct diff_options *o,
 	if (textconv_one == textconv_two && diff_unmodified_pair(p))
 		return 0;
 
-	fill_one(p->one, &mf1, &textconv_one);
-	fill_one(p->two, &mf2, &textconv_two);
+	fill_one(p->one, &mf1, textconv_one);
+	fill_one(p->two, &mf2, textconv_two);
 
 	if (!mf1.ptr) {
 		if (!mf2.ptr)
-- 
1.8.2

-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Next: Matthieu Moy
Message 1 of 3 in “diffcore-pickaxe: fill_one() doesn't modify textconv”
  1. 2/2 diffcore-pickaxe: fill_one() doesn't modify textconvSimon Ruderich, Apr 4, 2013
  2. Matthieu MoyApr 4, 2013
  3. Jeff KingApr 4, 2013

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.