git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] builtin/apply.c: make a file local symbol static
Date: Sun, 27 Sep 2015 19:33:46 +0100	[thread overview]
Message-ID: <5608368A.4010607@ramsayjones.plus.com> (raw)


Commit dddaaab62 ("apply: convert root string to strbuf", 24-09-2015)
converted a <char *str, int len> combination of variables into a
single 'struct strbuf' variable. In doing so, it unintentionally
increased the visibility of the variable. In order to reduce the
visibility to file local, add the static keyword to the declaration
of the 'root' symbol.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Jeff,

If you need to re-roll your 'jk/war-on-sprintf' series, could you
please squash this into the relevant patch.

Thanks!

ATB,
Ramsay Jones

 builtin/apply.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/apply.c b/builtin/apply.c
index 5dc908a..ec49658 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -77,7 +77,7 @@ static enum ws_ignore {
 
 
 static const char *patch_input_file;
-struct strbuf root = STRBUF_INIT;
+static struct strbuf root = STRBUF_INIT;
 static int read_stdin = 1;
 static int options;
 
-- 
2.5.0

                 reply	other threads:[~2015-09-27 18:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5608368A.4010607@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).