From 6f75d45b2412c646b74300f360361b319689e554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Mon, 9 Mar 2015 23:46:54 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transport.c') diff --git a/transport.c b/transport.c index 325f03e1ee..7ac0df21ea 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') -- cgit v1.2.3