Skip to contentSkip to conversation

sequencer: trivial cleanup

PATCH New Ramkumar Ramachandra 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sequencer: trivial cleanup

Consider that the return values of allow_empty() could either be negative, zero, or one. However, there is no reason to be overtly conservative about it: we might as well return positive values as well since the callsite has no problems with it.

---
 sequencer.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
sequencer.c +1 -7
index 351548f..ae25b5b 100644
@@ -463,13 +463,7 @@ static int allow_empty(struct replay_opts *opts, struct commit *commit)
 	if (opts->keep_redundant_commits)
 		return 1;
 
-	empty_commit = is_original_commit_empty(commit);
-	if (empty_commit < 0)
-		return empty_commit;
-	if (!empty_commit)
-		return 0;
-	else
-		return 1;
+	return is_original_commit_empty(commit);
 }
 
 static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
Signature · 1 line
1.8.4.299.gb3e7d24.dirty