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

[PATCH] attr: mark a file-local symbol as static

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Nov 13, 2016, 16:42 UTC
Message-ID
<83508d1f-e809-f6be-5afc-4c23195dbd08@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Stefan,

If you need to re-roll your 'sb/attr' branch, could you please squash this into the relevant patch.

Alternatively, since there is only a single call site for git_attr() (on line #1005), you could perhaps remove git_attr() and inline that call. (However, that does make that line exceed 80 columns).

Thanks!

ATB, Ramsay Jones

 attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/attr.c b/attr.c
index 667ba85..84c4b08 100644
--- a/attr.c
+++ b/attr.c
@@ -169,7 +169,7 @@ static struct git_attr *git_attr_internal(const char *name, int len)
 	return a;
 }
 
-struct git_attr *git_attr(const char *name)
+static struct git_attr *git_attr(const char *name)
 {
 	return git_attr_internal(name, strlen(name));
 }
-- 
2.10.0
Next: Stefan Beller
Message 1 of 2 in “attr: mark a file-local symbol as static”
  1. attr: mark a file-local symbol as staticRamsay Jones, Nov 13, 2016
  2. Stefan BellerNov 14, 2016

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.