git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 6/6] xdiff/xprepare.c: reduce scope of variables

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Apr 16, 2014, 09:55 UTC
Message-ID
<CABPQNSajC5vj78U7nk+656_V+poCZ1GNDBFRn_KWKwR-1QYg0Q@mail.gmail.com>
In-Reply-To
<1397640811-17719-6-git-send-email-gitter.spiros@gmail.com>
On Wed, Apr 16, 2014 at 11:33 AM, Elia Pinto <gitter.spiros@gmail.com> wrote:
Show 27 quoted lines
> 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;
We do not indent with spaces.
Previous: Elia PintoNext: Jonathan Nieder
Message 9 of 10 in “compat/regex/regcomp.c: reduce scope of variables”
  1. 1/6 compat/regex/regcomp.c: reduce scope of variablesElia Pinto, Apr 16, 2014
  2. 2/6 compat/regex/regex_internal.c: reduce scope of variablesElia Pinto, Apr 16, 2014
  3. 3/6 compat/regex/regexec.c: reduce scope of variablesElia Pinto, Apr 16, 2014
  4. 4/6 contrib/credential/osxkeychain/git-credential-osxkeychain.c: reduce scope of variablesElia Pinto, Apr 16, 2014
  5. Erik Faye-LundApr 16, 2014
  6. 5/6 contrib/credential/wincred/git-credential-wincred.c: reduce scope of variablesElia Pinto, Apr 16, 2014
  7. Erik Faye-LundApr 16, 2014
  8. 6/6 xdiff/xprepare.c: reduce scope of variablesElia Pinto, Apr 16, 2014
  9. Erik Faye-LundApr 16, 2014
  10. Jonathan NiederApr 16, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.