summaryrefslogtreecommitdiff
path: root/src/diff_stats.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/diff_stats.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/diff_stats.c')
-rw-r--r--src/diff_stats.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/diff_stats.c b/src/diff_stats.c
index 19c9da05f..1028b01a7 100644
--- a/src/diff_stats.c
+++ b/src/diff_stats.c
@@ -46,7 +46,7 @@ static int digits_for_value(size_t val)
return count;
}
-int git_diff_file_stats__full_to_buf(
+static int diff_file_stats_full_to_buf(
git_buf *out,
const git_diff_delta *delta,
const diff_file_stats *filestat,
@@ -134,7 +134,7 @@ on_error:
return (git_buf_oom(out) ? -1 : 0);
}
-int git_diff_file_stats__number_to_buf(
+static int diff_file_stats_number_to_buf(
git_buf *out,
const git_diff_delta *delta,
const diff_file_stats *filestats)
@@ -151,7 +151,7 @@ int git_diff_file_stats__number_to_buf(
return error;
}
-int git_diff_file_stats__summary_to_buf(
+static int diff_file_stats_summary_to_buf(
git_buf *out,
const git_diff_delta *delta)
{
@@ -288,7 +288,7 @@ int git_diff_stats_to_buf(
if ((delta = git_diff_get_delta(stats->diff, i)) == NULL)
continue;
- error = git_diff_file_stats__number_to_buf(
+ error = diff_file_stats_number_to_buf(
out, delta, &stats->filestats[i]);
if (error < 0)
return error;
@@ -309,7 +309,7 @@ int git_diff_stats_to_buf(
if ((delta = git_diff_get_delta(stats->diff, i)) == NULL)
continue;
- error = git_diff_file_stats__full_to_buf(
+ error = diff_file_stats_full_to_buf(
out, delta, &stats->filestats[i], stats, width);
if (error < 0)
return error;
@@ -342,7 +342,7 @@ int git_diff_stats_to_buf(
if ((delta = git_diff_get_delta(stats->diff, i)) == NULL)
continue;
- error = git_diff_file_stats__summary_to_buf(out, delta);
+ error = diff_file_stats_summary_to_buf(out, delta);
if (error < 0)
return error;
}