Re: [PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: SQUASH??? clarify the if/{if/else} nesting

Otherwise GCC helpfully warns you.

Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 diff.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/diff.c b/diff.c
index bfc0a6b..d128b9d 100644
--- a/diff.c
+++ b/diff.c
@@ -1170,11 +1170,12 @@ const char *diff_line_prefix(struct diff_options *opt)
 {
 	struct strbuf *msgbuf;
 
-	if (!opt->output_prefix)
+	if (!opt->output_prefix) {
 		if (opt->line_prefix)
 			return opt->line_prefix;
 		else
 			return "";
+	}
 
 	msgbuf = opt->output_prefix(opt, opt->output_prefix_data);
 	/* line prefix must be printed before the output_prefix() */
-- 
2.9.2-863-g71ed253

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]