diff options
author | Florian Forster <octo@verplant.org> | 2006-06-18 17:18:03 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-18 21:19:09 -0700 |
commit | cfd432e63d77478d913497a62827ed95c56dda73 (patch) | |
tree | b211821af83ec2653f23c6ea3d71fd8bd0e69397 /quote.c | |
parent | 64e86c57867593ba0ee77a7b0ff0eb8e9d4d8ed5 (diff) | |
download | git-cfd432e63d77478d913497a62827ed95c56dda73.tar.gz |
Remove ranges from switch statements.
Though very nice and readable, the "case 'a'...'z':" construct is not ANSI C99
compliant. This patch unfolds the range in `quote.c' and substitutes the
switch-statement with an if-statement in `http-fetch.c' and `http-push.c'.
Signed-off-by: Florian Forster <octo@verplant.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'quote.c')
-rw-r--r-- | quote.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -206,7 +206,14 @@ char *unquote_c_style(const char *quoted, const char **endp) case '\\': case '"': break; /* verbatim */ - case '0'...'7': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': /* octal */ ac = ((ch - '0') << 6); if ((ch = *sp++) < '0' || '7' < ch) |