diff options
| author | Patrick Steinhardt <ps@pks.im> | 2020-06-08 12:40:47 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2020-06-09 14:57:06 +0200 |
| commit | a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377 (patch) | |
| tree | e45c4ff8b8110a46f5bd84f0415c6c537b27ecb5 /src/util.c | |
| parent | 7c499b544dc3383cce38956f86d67f328bc718e6 (diff) | |
| download | libgit2-a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377.tar.gz | |
tree-wide: mark local functions as static
We've accumulated quite some functions which are never used outside of
their respective code unit, but which are lacking the `static` keyword.
Add it to reduce their linkage scope and allow the compiler to optimize
better.
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c index c4e322d5a..2efb212bc 100644 --- a/src/util.c +++ b/src/util.c @@ -777,7 +777,7 @@ static const int8_t utf8proc_utf8class[256] = { 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0 }; -int git__utf8_charlen(const uint8_t *str, size_t str_len) +static int util_utf8_charlen(const uint8_t *str, size_t str_len) { size_t length, i; @@ -802,7 +802,7 @@ int git__utf8_iterate(const uint8_t *str, int str_len, int32_t *dst) int32_t uc = -1; *dst = -1; - length = git__utf8_charlen(str, str_len); + length = util_utf8_charlen(str, str_len); if (length < 0) return -1; @@ -839,7 +839,7 @@ size_t git__utf8_valid_buf_length(const uint8_t *str, size_t str_len) size_t offset = 0; while (offset < str_len) { - int length = git__utf8_charlen(str + offset, str_len - offset); + int length = util_utf8_charlen(str + offset, str_len - offset); if (length < 0) break; |
