isxdigit: cast input to unsigned char
commit50a71776ab14c63c72c86e3ce1529052bcb2634a
authorJeff King <peff@peff.net>
Wed, 15 Oct 2014 22:34:05 +0000 (15 18:34 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Oct 2014 17:10:36 +0000 (16 10:10 -0700)
treec0027d319cbd238fbc20bf260e7d0d5bb37ac1b6
parentfe1b22686f26bed3047294cc4552e50ce58fa954
isxdigit: cast input to unsigned char

Otherwise, callers must do so or risk triggering warnings
-Wchar-subscript (and rightfully so; a signed char might
cause us to use a bogus negative index into the
hexval_table).

While we are dropping the now-unnecessary casts from the
caller in urlmatch.c, we can get rid of similar casts in
actually parsing the hex by using the hexval() helper, which
implicitly casts to unsigned (but note that we cannot
implement isxdigit in terms of hexval(), as it also casts
its return value to unsigned).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h
urlmatch.c