serve: mark has_capability() as static
The has_capability() function introduced in ed10cb952d3 (serve: introduce git-serve, 2018-03-15) has never been used anywhere except serve.c, so let's mark it as static. It was later changed from "extern" in 554544276a6 (*.[ch]: remove extern from function declarations using spatch, 2019-04-29), but we could have simply marked it as "static" instead. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Aug 5, 2021 at 03:25 UTC
eacf36a4d1d6e83418c02f61e0c418d049000240
2 files changed
+2
-6
serve.c
+2
-2
@@ -156,8 +156,8 @@ static int is_command(const char *key, struct protocol_capability **command)
156
return 0;
157
}
158
159
-int has_capability(const struct strvec *keys, const char *capability,
160
- const char **value)
159
+static int has_capability(const struct strvec *keys, const char *capability,
160
+ const char **value)
161
{
162
int i;
163
for (i = 0; i < keys->nr; i++) {
serve.h
-4
@@ -1,10 +1,6 @@
1
#ifndef SERVE_H
2
#define SERVE_H
3
4
-struct strvec;
5
-int has_capability(const struct strvec *keys, const char *capability,
6
- const char **value);
7
-
4
struct serve_options {
5
unsigned advertise_capabilities;
6
unsigned stateless_rpc;