summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2021-07-11 15:33:52 -0600
committerAaron Ball <nullspoon@oper.io>2021-07-11 15:33:52 -0600
commit9aa89ac1ca1437a5058479b5f7917c22d8e60ca7 (patch)
tree56f2b24667a59f677a3fa06f61f3203363736b0b
parent2daf79139f24e78de63c37d143e40d6341146afe (diff)
downloadgitaccess-9aa89ac1ca1437a5058479b5f7917c22d8e60ca7.tar.gz
gitaccess-9aa89ac1ca1437a5058479b5f7917c22d8e60ca7.tar.xz
Simplify the is_git_cmd function
-rw-r--r--src/main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 88a7887..9fb7f31 100644
--- a/src/main.c
+++ b/src/main.c
@@ -159,11 +159,9 @@ int line_in_file(char* path, char* line) {
* @return 1 if is a git command, 0 if not
*/
int is_git_cmd(char* str) {
- if(strcmp(str, "git-upload-pack") == 0)
- return 1;
- else if(strcmp(str, "git-upload-archive") == 0)
- return 1;
- else if(strcmp(str, "git-receive-pack") == 0)
+ if(strcmp(str, "git-upload-pack") == 0
+ || strcmp(str, "git-upload-archive") == 0
+ || strcmp(str, "git-receive-pack") == 0)
return 1;
return 0;
}

Generated by cgit