aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2015-03-09 23:46:54 +0100
committerJunio C Hamano <gitster@pobox.com>2015-03-10 15:44:41 -0700
commit6f75d45b2412c646b74300f360361b319689e554 (patch)
tree9019acb18d49dba98769569f5ad2fccfbd5d696f /transport.c
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-6f75d45b2412c646b74300f360361b319689e554.tar.gz
git-6f75d45b2412c646b74300f360361b319689e554.tar.xz
use isxdigit() for checking if a character is a hexadecimal digit
Use the standard function isxdigit() to make the intent clearer and avoid using magic constants. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 325f03e1e..7ac0df21e 100644
--- a/transport.c
+++ b/transport.c
@@ -117,7 +117,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
return;
}
- if (hexval(buffer[0]) > 0xf)
+ if (!isxdigit(buffer[0]))
continue;
len = strlen(buffer);
if (len && buffer[len - 1] == '\n')