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

[PATCH] promisor-remote.h: drop extern from function declaration

From
Denton Liu <liu.denton@gmail.com>
Date
Sep 21, 2019, 00:03 UTC
Message-ID
<96a3cee1dd4700a9e033f545db5891e4fa8c073d.1569024025.git.liu.denton@gmail.com>

During the creation of this file, each time a new function declaration was introduced, it included an `extern`. However, starting from 554544276a (*.[ch]: remove extern from function declarations using spatch, 2019-04-29), we've been actively trying to prevent externs from being used in function declarations because they're unnecessary.

Remove these spurious `extern`s.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
This patch should be placed on the tip of cc/multi-promisor.
I wonder if there's any way we can automate this check...
 promisor-remote.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/promisor-remote.h b/promisor-remote.h
index 8200dfc940..c60aaa5cce 100644
--- a/promisor-remote.h
+++ b/promisor-remote.h
@@ -15,17 +15,17 @@ struct promisor_remote {
 	const char name[FLEX_ARRAY];
 };
 
-extern void promisor_remote_reinit(void);
-extern struct promisor_remote *promisor_remote_find(const char *remote_name);
-extern int has_promisor_remote(void);
-extern int promisor_remote_get_direct(struct repository *repo,
-				      const struct object_id *oids,
-				      int oid_nr);
+void promisor_remote_reinit(void);
+struct promisor_remote *promisor_remote_find(const char *remote_name);
+int has_promisor_remote(void);
+int promisor_remote_get_direct(struct repository *repo,
+			       const struct object_id *oids,
+			       int oid_nr);
 
 /*
  * This should be used only once from setup.c to set the value we got
  * from the extensions.partialclone config option.
  */
-extern void set_repository_format_partial_clone(char *partial_clone);
+void set_repository_format_partial_clone(char *partial_clone);
 
 #endif /* PROMISOR_REMOTE_H */
-- 
2.23.0.565.g1cc52d20df
Message 1 of 1 in “promisor-remote.h: drop extern from function declaration”
  1. promisor-remote.h: drop extern from function declarationDenton Liu, Sep 21, 2019

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.