Skip to content

Commit

Permalink
use name[len] in switch directly, instead of creating a shadowed vari…
Browse files Browse the repository at this point in the history
…able.

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>
  • Loading branch information
Pierre Habouzit authored and Junio C Hamano committed Aug 24, 2006
1 parent 599f8d6 commit dd305c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit dd305c8

Please sign in to comment.