summaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-18 22:13:54 -0700
committerJunio C Hamano <junkio@cox.net>2006-06-18 22:13:54 -0700
commit275fb96ae65b0886d9e6e93a421453eb6d13cb9f (patch)
treef982b8defd5c9f3b887bcbe97edc0c63742df16d /http-fetch.c
parent69c18d887253a8fd44df232a604ba3dac3d371a5 (diff)
parent2bda77e080dd8d47ca0b87c78e9061fbaa37455a (diff)
downloadgit-275fb96ae65b0886d9e6e93a421453eb6d13cb9f.tar.gz
Merge early parts of branch 'ff/c99'
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/http-fetch.c b/http-fetch.c
index da1a7f5416..3a2cb5e1fc 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1136,13 +1136,14 @@ int fetch(unsigned char *sha1)
static inline int needs_quote(int ch)
{
- switch (ch) {
- case '/': case '-': case '.':
- case 'A'...'Z': case 'a'...'z': case '0'...'9':
+ if (((ch >= 'A') && (ch <= 'Z'))
+ || ((ch >= 'a') && (ch <= 'z'))
+ || ((ch >= '0') && (ch <= '9'))
+ || (ch == '/')
+ || (ch == '-')
+ || (ch == '.'))
return 0;
- default:
- return 1;
- }
+ return 1;
}
static inline int hex(int v)