use name[len] in switch directly, instead of creating a shadowed variable.
authorPierre Habouzit <madcoder@debian.org>
Wed, 23 Aug 2006 10:39:15 +0000 (12:39 +0200)
committerJunio C Hamano <junkio@cox.net>
Thu, 24 Aug 2006 01:47:39 +0000 (18:47 -0700)
builtin-apply.c defines a local variable 'c' which is used only
once and then later gets shadowed by another instance of 'c'.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c
index 59917379f9aa49afc80cdf5110324834a5dddf96..f8f5eebd2f9b6ebbad46e8d86efde535f30a194f 100644 (file)
@@ -606,9 +606,7 @@ static char *git_header_name(char *line, int llen)
         * form.
         */
        for (len = 0 ; ; len++) {
-               char c = name[len];
-
-               switch (c) {
+               switch (name[len]) {
                default:
                        continue;
                case '\n':