diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-05-14 07:42:25 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-14 10:13:39 -0700 |
commit | 826c01d0a00253727942ae26e876d509a72908b3 (patch) | |
tree | c3b750ecd74f3f0a9c083744df55a10ff11865c7 /core/git-access.c | |
parent | 543cefa61e54cadb5c8af503386d74d3d89c3dab (diff) | |
download | subsurface-826c01d0a00253727942ae26e876d509a72908b3.tar.gz |
Core: don't inline rarely used function
This is only used by one caller and there doesn't appear to be a reason
to inline it in the first place.
Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/git-access.c')
-rw-r--r-- | core/git-access.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/git-access.c b/core/git-access.c index 18db832a1..233af66ae 100644 --- a/core/git-access.c +++ b/core/git-access.c @@ -28,6 +28,21 @@ bool is_subsurface_cloud = false; int (*update_progress_cb)(const char *) = NULL; +static bool includes_string_caseinsensitive(const char *haystack, const char *needle) +{ + if (!needle) + return 1; /* every string includes the NULL string */ + if (!haystack) + return 0; /* nothing is included in the NULL string */ + int len = strlen(needle); + while (*haystack) { + if (strncasecmp(haystack, needle, len)) + return 1; + haystack++; + } + return 0; +} + void set_git_update_cb(int(*cb)(const char *)) { update_progress_cb = cb; |