git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elia Pinto <gitter.spiros@gmail.com>
To: git@vger.kernel.org
Cc: Elia Pinto <gitter.spiros@gmail.com>
Subject: [PATCH 6/6] xdiff/xprepare.c: reduce scope of variables
Date: Wed, 16 Apr 2014 02:33:31 -0700	[thread overview]
Message-ID: <1397640811-17719-6-git-send-email-gitter.spiros@gmail.com> (raw)
In-Reply-To: <1397640811-17719-1-git-send-email-gitter.spiros@gmail.com>

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 xdiff/xprepare.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c
index 63a22c6..e0b6987 100644
--- a/xdiff/xprepare.c
+++ b/xdiff/xprepare.c
@@ -161,8 +161,7 @@ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_
 			   xdlclassifier_t *cf, xdfile_t *xdf) {
 	unsigned int hbits;
 	long nrec, hsize, bsize;
-	unsigned long hav;
-	char const *blk, *cur, *top, *prev;
+	char const *blk, *cur, *prev;
 	xrecord_t *crec;
 	xrecord_t **recs, **rrecs;
 	xrecord_t **rhash;
@@ -193,7 +192,9 @@ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_
 
 	nrec = 0;
 	if ((cur = blk = xdl_mmfile_first(mf, &bsize)) != NULL) {
+                char const *top;
 		for (top = blk + bsize; cur < top; ) {
+                        unsigned long hav;
 			prev = cur;
 			hav = xdl_hash_record(&cur, top, xpp->flags);
 			if (nrec >= narec) {
-- 
1.7.10.4

  parent reply	other threads:[~2014-04-16  9:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  9:33 [PATCH 1/6] compat/regex/regcomp.c: reduce scope of variables Elia Pinto
2014-04-16  9:33 ` [PATCH 2/6] compat/regex/regex_internal.c: " Elia Pinto
2014-04-16  9:33 ` [PATCH 3/6] compat/regex/regexec.c: " Elia Pinto
2014-04-16  9:33 ` [PATCH 4/6] contrib/credential/osxkeychain/git-credential-osxkeychain.c: " Elia Pinto
2014-04-16  9:55   ` Erik Faye-Lund
2014-04-16  9:33 ` [PATCH 5/6] contrib/credential/wincred/git-credential-wincred.c: " Elia Pinto
2014-04-16  9:54   ` Erik Faye-Lund
2014-04-16  9:33 ` Elia Pinto [this message]
2014-04-16  9:55   ` [PATCH 6/6] xdiff/xprepare.c: " Erik Faye-Lund
2014-04-16 16:49 ` [PATCH 1/6] compat/regex/regcomp.c: " Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397640811-17719-6-git-send-email-gitter.spiros@gmail.com \
    --to=gitter.spiros@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).