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

[PATCH 2/3] diff.c: remove unnecessary typecast

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Feb 22, 2016, 12:52 UTC
Message-ID
<1456145545-5374-2-git-send-email-pclouds@gmail.com>
In-Reply-To
<1456145545-5374-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 diff.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 8b3a3db..5bdc3c0 100644
--- a/diff.c
+++ b/diff.c
@@ -717,8 +717,8 @@ static void emit_rewrite_diff(const char *name_a,
 	ecbdata.opt = o;
 	if (ecbdata.ws_rule & WS_BLANK_AT_EOF) {
 		mmfile_t mf1, mf2;
-		mf1.ptr = (char *)data_one;
-		mf2.ptr = (char *)data_two;
+		mf1.ptr = data_one;
+		mf2.ptr = data_two;
 		mf1.size = size_one;
 		mf2.size = size_two;
 		check_blank_at_eof(&mf1, &mf2, &ecbdata);
-- 
2.7.1.532.gd9e3aaa
Next: Nguyễn Thái Ngọc Duy
Message 1 of 10 in “diff.c: remove unnecessary typecast”
  1. 2/3 diff.c: remove unnecessary typecastNguyễn Thái Ngọc Duy, Feb 22, 2016
  2. 3/3 Correct conditions to free textconv result dataNguyễn Thái Ngọc Duy, Feb 22, 2016
  3. Duy NguyenFeb 22, 2016
  4. Jeff KingFeb 22, 2016
  5. Jeff KingFeb 22, 2016
  6. Duy NguyenFeb 22, 2016
  7. Junio C HamanoFeb 22, 2016
  8. Jeff KingFeb 22, 2016
  9. diff: clarify textconv interfaceJeff King, Feb 22, 2016
  10. Duy NguyenFeb 22, 2016

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.