git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] builtin/apply.c: make a file local symbol static
@ 2015-09-27 18:33 Ramsay Jones
  0 siblings, 0 replies; only message in thread
From: Ramsay Jones @ 2015-09-27 18:33 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, GIT Mailing-list


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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-27 18:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-27 18:33 [PATCH] builtin/apply.c: make a file local symbol static Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).