Skip to content

Commit eacf36a

Browse files
avargitster
authored andcommitted
serve: mark has_capability() as static
The has_capability() function introduced in ed10cb9 (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 5545442 (*.[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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e5a14dd commit eacf36a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

serve.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ static int is_command(const char *key, struct protocol_capability **command)
156156
return 0;
157157
}
158158

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)
161161
{
162162
int i;
163163
for (i = 0; i < keys->nr; i++) {

serve.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#ifndef SERVE_H
22
#define SERVE_H
33

4-
struct strvec;
5-
int has_capability(const struct strvec *keys, const char *capability,
6-
const char **value);
7-
84
struct serve_options {
95
unsigned advertise_capabilities;
106
unsigned stateless_rpc;

0 commit comments

Comments
 (0)