From: Junio C Hamano Date: Sat, 14 Mar 2015 05:56:07 +0000 (-0700) Subject: Merge branch 'bw/kwset-use-unsigned' into maint X-Git-Tag: v2.3.3~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae8ada450a9103d2fe94ac9baf072fd31de08c30;p=git Merge branch 'bw/kwset-use-unsigned' into maint The borrowed code in kwset API did not follow our usual convention to use "unsigned char" to store values that range from 0-255. * bw/kwset-use-unsigned: kwset: use unsigned char to store values with high-bit set --- ae8ada450a9103d2fe94ac9baf072fd31de08c30 diff --cc git-compat-util.h index 8b72e2a8dd,e96bec3a96..35b3fe0b3b --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -687,8 -546,15 +687,8 @@@ static inline size_t xsize_t(off_t len return (size_t)len; } -static inline int has_extension(const char *filename, const char *ext) -{ - size_t len = strlen(filename); - size_t extlen = strlen(ext); - return len > extlen && !memcmp(filename + len - extlen, ext, extlen); -} - /* in ctype.c, for kwset users */ - extern const char tolower_trans_tbl[256]; + extern const unsigned char tolower_trans_tbl[256]; /* Sane ctype - no locale, and works with signed chars */ #undef isascii