[PATCH 1/2] diffcore-pickaxe.c: remove unnecessary curly braces

Subsystems: the rest

DORMANTno replies

2 messages, 1 author, 2016-06-15 · open the first message on its own page

[PATCH 1/2] diffcore-pickaxe.c: remove unnecessary curly braces

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:42

From: Brandon Casey <redacted>


Signed-off-by: Brandon Casey <redacted>
---
 diffcore-pickaxe.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 84195e4..3857099 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -269,9 +269,8 @@ static void diffcore_pickaxe_count(struct diff_options *o)
 				diff_free_filepair(p);
 		}
 
-	if (opts & DIFF_PICKAXE_REGEX) {
+	if (opts & DIFF_PICKAXE_REGEX)
 		regfree(&regex);
-	}
 
 	free(q->queue);
 	*q = outq;
-- 
1.7.3.1

[PATCH 2/2] diffcore-pickaxe.c: a void function shouldn't try to return something

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:42

From: Brandon Casey <redacted>


Signed-off-by: Brandon Casey <redacted>
---
 diffcore-pickaxe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 3857099..ea03b91 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -281,7 +281,7 @@ void diffcore_pickaxe(struct diff_options *o)
 {
 	/* Might want to warn when both S and G are on; I don't care... */
 	if (o->pickaxe_opts & DIFF_PICKAXE_KIND_G)
-		return diffcore_pickaxe_grep(o);
+		diffcore_pickaxe_grep(o);
 	else
-		return diffcore_pickaxe_count(o);
+		diffcore_pickaxe_count(o);
 }
-- 
1.7.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help