diff mbox series

[2/2] add: avoid yoda condition

Message ID 20210613063702.269816-3-felipe.contreras@gmail.com (mailing list archive)
State New, archived
Headers show
Series Trivial cleanups | expand

Commit Message

Felipe Contreras June 13, 2021, 6:37 a.m. UTC
18 is younger than person's age.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/add.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/add.c b/builtin/add.c
index b773b5a499..8c2a5a5094 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -510,7 +510,7 @@  int cmd_add(int argc, const char **argv, const char *prefix)
 	argc--;
 	argv++;
 
-	if (0 <= addremove_explicit)
+	if (addremove_explicit >= 0)
 		addremove = addremove_explicit;
 	else if (take_worktree_changes && ADDREMOVE_DEFAULT)
 		addremove = 0; /* "-u" was given but not "-A" */