Merge branch 'bw/kwset-use-unsigned'
authorJunio C Hamano <gitster@pobox.com>
Fri, 6 Mar 2015 23:02:33 +0000 (15:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Mar 2015 23:02:33 +0000 (15:02 -0800)
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

1  2 
git-compat-util.h
index fd58b1d2bcde2e1bff67ce503226bdbedf82a382,e96bec3a96af27acb4ccb238ba8afa7cc9444adc..a3095be962c04d5b55c54ec39c6c3e6989372c36
@@@ -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