use name[len] in switch directly, instead of creating a shadowed variable.
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>
Pierre Habouzit committed
Aug 23, 2006 at 12:39 UTC
dd305c846231e2fddf61c1e1314029b53af88a77
1 file changed
+1
-3
builtin-apply.c
+1
-3
@@ -606,9 +606,7 @@ static char *git_header_name(char *line, int llen)
606
* form.
607
*/
608
for (len = 0 ; ; len++) {
609
- char c = name[len];
610
-
611
- switch (c) {
609
+ switch (name[len]) {
610
default:
611
continue;
612
case '\n':