aboutsummaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-05-27 13:59:10 -0700
committerJunio C Hamano <gitster@pobox.com>2025-05-27 13:59:11 -0700
commitf9cdaa2860e20f3f36595646b7a82082aa772df8 (patch)
tree40513df8eb4aec40cc4ec28e0ba4855d532be476 /help.c
parentMerge branch 'sj/use-mmap-to-check-packed-refs' (diff)
parentsequencer: stop pretending that an assignment is a condition (diff)
downloadgit-f9cdaa2860e20f3f36595646b7a82082aa772df8.tar.gz
git-f9cdaa2860e20f3f36595646b7a82082aa772df8.zip
Merge branch 'js/misc-fixes'
Assorted fixes for issues found with CodeQL. * js/misc-fixes: sequencer: stop pretending that an assignment is a condition bundle-uri: avoid using undefined output of `sscanf()` commit-graph: avoid using stale stack addresses trace2: avoid "futile conditional" Avoid redundant conditions fetch: avoid unnecessary work when there is no current branch has_dir_name(): make code more obvious upload-pack: rename `enum` to reflect the operation commit-graph: avoid malloc'ing a local variable fetch: carefully clear local variable's address after use commit: simplify code
Diffstat (limited to 'help.c')
-rw-r--r--help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/help.c b/help.c
index 6ef90838f1..21b778707a 100644
--- a/help.c
+++ b/help.c
@@ -214,7 +214,7 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
else if (cmp == 0) {
ei++;
free(cmds->names[ci++]);
- } else if (cmp > 0)
+ } else
ei++;
}