diff options
| author | Etienne Samson <samson.etienne@gmail.com> | 2018-09-18 12:12:06 +0000 |
|---|---|---|
| committer | Etienne Samson <samson.etienne@gmail.com> | 2018-09-25 14:44:40 +0200 |
| commit | be4717d2a1f8ee152e46b2afc8d8510bc82243a5 (patch) | |
| tree | 0f709a2fbd07f1de625f9476facb9eac74553da6 /src/path.c | |
| parent | 21496c3024b3ab4168a8e4b4d1ef03da736aeac5 (diff) | |
| download | libgit2-be4717d2a1f8ee152e46b2afc8d8510bc82243a5.tar.gz | |
path: fix "comparison always true" warning
Diffstat (limited to 'src/path.c')
| -rw-r--r-- | src/path.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c index c8bc8d402..9fab29e8b 100644 --- a/src/path.c +++ b/src/path.c @@ -1887,7 +1887,7 @@ extern int git_path_is_gitfile(const char *path, size_t pathlen, git_path_gitfil const char *file, *hash; size_t filelen; - if (gitfile < 0 && gitfile >= ARRAY_SIZE(gitfiles)) { + if (!(gitfile >= GIT_PATH_GITFILE_GITIGNORE && gitfile < ARRAY_SIZE(gitfiles))) { giterr_set(GITERR_OS, "invalid gitfile for path validation"); return -1; } |
