aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2006-08-23 12:39:15 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-23 18:47:39 -0700
commitdd305c846231e2fddf61c1e1314029b53af88a77 (patch)
tree0fe8e7abe3367474bdc46509ba834b01b7bb6151 /builtin-apply.c
parent599f8d63140f3626604d4fc83a48cd00c67b804a (diff)
downloadgit-dd305c846231e2fddf61c1e1314029b53af88a77.tar.gz
git-dd305c846231e2fddf61c1e1314029b53af88a77.tar.xz
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>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c4
1 files changed, 1 insertions, 3 deletions
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':