From: Pierre Habouzit Date: Wed, 23 Aug 2006 10:39:15 +0000 (+0200) Subject: use name[len] in switch directly, instead of creating a shadowed variable. X-Git-Tag: v1.4.3-rc1~204 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dd305c846231e2fddf61c1e1314029b53af88a77;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin-apply.c b/builtin-apply.c index 59917379f..f8f5eebd2 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -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':