Skip to content

Commit

Permalink
satisfy CI clang-format (#339)
Browse files Browse the repository at this point in the history
* satisfy CI clang-format

* specify main branch when calling git-clang-format
  • Loading branch information
Dewb authored Jan 6, 2025
1 parent c60cfcd commit 937b002
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ teletype.zip: clean-zip
docs/cheatsheet/cheatsheet.pdf

format:
git-clang-format -f --style=file
git-clang-format -f --style=file main

format-all:
find . -type f -name "*.c" -o -name "*.h" | xargs clang-format -style=file -i
4 changes: 1 addition & 3 deletions module/help_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1692,9 +1692,7 @@ bool text_search_forward(search_state_t* state, const char* needle,
bool text_search_reverse(search_state_t* state, const char* needle,
const char** haystack, int haystack_len) {
const int needle_len = strlen(needle);
if (state->line >= haystack_len) {
state->line = haystack_len - 1;
}
if (state->line >= haystack_len) { state->line = haystack_len - 1; }
for (; state->line >= 0; state->line--) {
const int haystack_line_len = strlen(haystack[state->line]);
for (state->ch = haystack_line_len - needle_len; state->ch >= 0;
Expand Down

0 comments on commit 937b002

Please # to comment.