Move local variables to narrower scopes

These weren't used outside and can be safely moved

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Benjamin Kramer
2009-03-07 21:02:26 +01:00
committed by Junio C Hamano
parent eb3a9dd327
commit fd13b21f52
4 changed files with 8 additions and 12 deletions

View File

@ -397,12 +397,11 @@ static int get_common_commits(void)
static char line[1000];
unsigned char sha1[20];
char hex[41], last_hex[41];
int len;
save_commit_buffer = 0;
for(;;) {
len = packet_read_line(0, line, sizeof(line));
int len = packet_read_line(0, line, sizeof(line));
reset_timeout();
if (!len) {
@ -410,7 +409,7 @@ static int get_common_commits(void)
packet_write(1, "NAK\n");
continue;
}
len = strip(line, len);
strip(line, len);
if (!prefixcmp(line, "have ")) {
switch (got_sha1(line+5, sha1)) {
case -1: /* they have what we do not */