builtin/apply.c: reduce scope of variables

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elia Pinto committed Jan 29, 2014 at 05:30 UTC e36f3a8a6fa1a1d99fb5730cd7642ecd0854b564
1 file changed +6 -6
builtin/apply.c
+6 -6
@@ -1943,13 +1943,7 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
1943 size - offset - hdrsize, patch);
1944
1945 if (!patchsize) {
1946 - static const char *binhdr[] = {
1947 - "Binary files ",
1948 - "Files ",
1949 - NULL,
1950 - };
1946 static const char git_binary[] = "GIT binary patch\n";
1952 - int i;
1947 int hd = hdrsize + offset;
1948 unsigned long llen = linelen(buffer + hd, size - hd);
1949
@@ -1965,6 +1959,12 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
1959 patchsize = 0;
1960 }
1961 else if (!memcmp(" differ\n", buffer + hd + llen - 8, 8)) {
1962 + static const char *binhdr[] = {
1963 + "Binary files ",
1964 + "Files ",
1965 + NULL,
1966 + };
1967 + int i;
1968 for (i = 0; binhdr[i]; i++) {
1969 int len = strlen(binhdr[i]);
1970 if (len < size - hd &&