From: Junio C Hamano Date: Fri, 6 Mar 2015 23:02:33 +0000 (-0800) Subject: Merge branch 'bw/kwset-use-unsigned' X-Git-Tag: v2.4.0-rc0~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52d5bf77875275bbfc1bf1d7b690f355d5c869e4;p=git Merge branch 'bw/kwset-use-unsigned' 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 --- 52d5bf77875275bbfc1bf1d7b690f355d5c869e4 diff --cc git-compat-util.h index fd58b1d2bc,e96bec3a96..a3095be962 --- 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