summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2015-03-09 22:46:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-10 22:44:41 (GMT)
commit6f75d45b2412c646b74300f360361b319689e554 (patch)
tree9019acb18d49dba98769569f5ad2fccfbd5d696f /sha1_name.c
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-6f75d45b2412c646b74300f360361b319689e554.zip
git-6f75d45b2412c646b74300f360361b319689e554.tar.gz
git-6f75d45b2412c646b74300f360361b319689e554.tar.bz2
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 'sha1_name.c')
-rw-r--r--sha1_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index c2c938c..dc85aaf 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -749,7 +749,7 @@ static int get_describe_name(const char *name, int len, unsigned char *sha1)
for (cp = name + len - 1; name + 2 <= cp; cp--) {
char ch = *cp;
- if (hexval(ch) & ~0377) {
+ if (!isxdigit(ch)) {
/* We must be looking at g in "SOMETHING-g"
* for it to be describe output.
*/