projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove ranges from switch statements.
[git.git]
/
http-fetch.c
diff --git
a/http-fetch.c
b/http-fetch.c
index
da1a7f5
..
3a2cb5e
100644
(file)
--- a/
http-fetch.c
+++ b/
http-fetch.c
@@
-1136,13
+1136,14
@@
int fetch(unsigned char *sha1)
static inline int needs_quote(int ch)
{
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;
return 0;
- default:
- return 1;
- }
+ return 1;
}
static inline int hex(int v)
}
static inline int hex(int v)