summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-06-08 12:40:47 +0200
committerPatrick Steinhardt <ps@pks.im>2020-06-09 14:57:06 +0200
commita6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377 (patch)
treee45c4ff8b8110a46f5bd84f0415c6c537b27ecb5 /src/remote.c
parent7c499b544dc3383cce38956f86d67f328bc718e6 (diff)
downloadlibgit2-a6c9e0b367c4882ab0f8e78bd0ad4ab2904ac377.tar.gz
tree-wide: mark local functions as static
We've accumulated quite some functions which are never used outside of their respective code unit, but which are lacking the `static` keyword. Add it to reduce their linkage scope and allow the compiler to optimize better.
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote.c b/src/remote.c
index b0ccf0305..78e056a9d 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -686,7 +686,7 @@ int git_remote__urlfordirection(git_buf *url_out, struct git_remote *remote, int
return resolve_url(url_out, url, direction, callbacks);
}
-int set_transport_callbacks(git_transport *t, const git_remote_callbacks *cbs)
+static int remote_transport_set_callbacks(git_transport *t, const git_remote_callbacks *cbs)
{
if (!t->set_callbacks || !cbs)
return 0;
@@ -744,7 +744,7 @@ int git_remote__connect(git_remote *remote, git_direction direction, const git_r
if ((error = set_transport_custom_headers(t, conn->custom_headers)) != 0)
goto on_error;
- if ((error = set_transport_callbacks(t, callbacks)) < 0 ||
+ if ((error = remote_transport_set_callbacks(t, callbacks)) < 0 ||
(error = t->connect(t, url.ptr, credentials, payload, conn->proxy, direction, flags)) != 0)
goto on_error;