summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 755b99d)
raw | patch | inline | side by side (parent: 755b99d)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Fri, 23 Feb 2007 04:20:32 +0000 (05:20 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 23 Feb 2007 05:24:34 +0000 (21:24 -0800) |
The code forgets that typecast binds tighter than addition, in
other words:
(cast *)array + i === ((cast *)array) + i
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
other words:
(cast *)array + i === ((cast *)array) + i
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-diff.c | patch | blob | history |
diff --git a/builtin-diff.c b/builtin-diff.c
index a6590205e8f746304f3d06d3e328a05bf2bf954e..c387ebb16c6bd353a84abd9454892eeab309ef1e 100644 (file)
--- a/builtin-diff.c
+++ b/builtin-diff.c
parent = xmalloc(ents * sizeof(*parent));
/* Again, the revs are all reverse */
for (i = 0; i < ents; i++)
- hashcpy((unsigned char*)parent + i, ent[ents - 1 - i].item->sha1);
+ hashcpy((unsigned char *)(parent + i),
+ ent[ents - 1 - i].item->sha1);
diff_tree_combined(parent[0], parent + 1, ents - 1,
revs->dense_combined_merges, revs);
return 0;