diff options
Diffstat (limited to 'git-compat-util.h')
| -rw-r--r-- | git-compat-util.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 5bd69ec040..9408f463e3 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -897,16 +897,16 @@ static inline size_t xsize_t(off_t len) * is done via tolower(), so it is strictly ASCII (no multi-byte characters or * locale-specific conversions). */ -static inline int skip_iprefix(const char *str, const char *prefix, +static inline bool skip_iprefix(const char *str, const char *prefix, const char **out) { do { if (!*prefix) { *out = str; - return 1; + return true; } } while (tolower(*str++) == tolower(*prefix++)); - return 0; + return false; } /* @@ -914,7 +914,7 @@ static inline int skip_iprefix(const char *str, const char *prefix, * comparison is done via tolower(), so it is strictly ASCII (no multi-byte * characters or locale-specific conversions). */ -static inline int skip_iprefix_mem(const char *buf, size_t len, +static inline bool skip_iprefix_mem(const char *buf, size_t len, const char *prefix, const char **out, size_t *outlen) { @@ -922,10 +922,10 @@ static inline int skip_iprefix_mem(const char *buf, size_t len, if (!*prefix) { *out = buf; *outlen = len; - return 1; + return true; } } while (len-- > 0 && tolower(*buf++) == tolower(*prefix++)); - return 0; + return false; } static inline int strtoul_ui(char const *s, int base, unsigned int *result) |
