* [PATCH 2/2] builtin/apply.c: reduce scope of variables
@ 2014-01-29 13:30 Elia Pinto
0 siblings, 0 replies; only message in thread
From: Elia Pinto @ 2014-01-29 13:30 UTC (permalink / raw)
To: git; +Cc: Elia Pinto
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
builtin/apply.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin/apply.c b/builtin/apply.c
index b0d0986..a7e72d5 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1943,13 +1943,7 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
size - offset - hdrsize, patch);
if (!patchsize) {
- static const char *binhdr[] = {
- "Binary files ",
- "Files ",
- NULL,
- };
static const char git_binary[] = "GIT binary patch\n";
- int i;
int hd = hdrsize + offset;
unsigned long llen = linelen(buffer + hd, size - hd);
@@ -1965,6 +1959,12 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
patchsize = 0;
}
else if (!memcmp(" differ\n", buffer + hd + llen - 8, 8)) {
+ static const char *binhdr[] = {
+ "Binary files ",
+ "Files ",
+ NULL,
+ };
+ int i;
for (i = 0; binhdr[i]; i++) {
int len = strlen(binhdr[i]);
if (len < size - hd &&
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-29 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 13:30 [PATCH 2/2] builtin/apply.c: reduce scope of variables Elia Pinto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).