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>
This commit is contained in:
parent
599f8d6314
commit
dd305c8462
@ -606,9 +606,7 @@ static char *git_header_name(char *line, int llen)
|
|||||||
* form.
|
* form.
|
||||||
*/
|
*/
|
||||||
for (len = 0 ; ; len++) {
|
for (len = 0 ; ; len++) {
|
||||||
char c = name[len];
|
switch (name[len]) {
|
||||||
|
|
||||||
switch (c) {
|
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
case '\n':
|
case '\n':
|
||||||
|
Loading…
Reference in New Issue
Block a user