aboutsummaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-06-12 17:23:15 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-12 20:29:31 -0700
commitdc7090efbc8280e482a6b2dc7419e525cbc3c5d7 (patch)
treef481f10db8f32aa27f69bb0a9965088c92194444 /diffcore.h
parent206de27efac383cecc3d0f938e220dc359be36c1 (diff)
downloadgit-dc7090efbc8280e482a6b2dc7419e525cbc3c5d7.tar.gz
git-dc7090efbc8280e482a6b2dc7419e525cbc3c5d7.tar.xz
[PATCH] Re-Fix SIGSEGV on unmerged files in git-diff-files -p
When an unmerged path was fed via diff_unmerged() into diffcore, it eventually called run_diff() with "one" and "two" parameters with NULL, but run_diff() was not written carefully enough to notice this situation. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore.h b/diffcore.h
index ac159d715..f1b5ca748 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -33,7 +33,7 @@ struct diff_filespec {
* if false, use the name and read from
* the filesystem.
*/
-#define DIFF_FILE_VALID(spec) ((spec) && ((spec)->mode) != 0)
+#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */
};