mark functions which are not exposed to other files as static
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
diff --git a/lib/fileindex.c b/lib/fileindex.c
index acc2c26..3132285 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -53,15 +53,15 @@ struct got_fileindex {
#define GOT_FILEIDX_MAX_ENTRIES INT_MAX
};
-mode_t
-got_fileindex_entry_perms_get(struct got_fileindex_entry *ie)
+static mode_t
+fileindex_entry_perms_get(struct got_fileindex_entry *ie)
{
return ((ie->mode & GOT_FILEIDX_MODE_PERMS) >>
GOT_FILEIDX_MODE_PERMS_SHIFT);
}
-void
-got_fileindex_entry_perms_set(struct got_fileindex_entry *ie, mode_t mode)
+static void
+fileindex_entry_perms_set(struct got_fileindex_entry *ie, mode_t mode)
{
ie->mode &= ~GOT_FILEIDX_MODE_PERMS;
ie->mode |= ((mode << GOT_FILEIDX_MODE_PERMS_SHIFT) &
@@ -71,7 +71,7 @@ got_fileindex_entry_perms_set(struct got_fileindex_entry *ie, mode_t mode)
mode_t
got_fileindex_perms_to_st(struct got_fileindex_entry *ie)
{
- mode_t perms = got_fileindex_entry_perms_get(ie);
+ mode_t perms = fileindex_entry_perms_get(ie);
int type = got_fileindex_entry_filetype_get(ie);
uint32_t ftype;
@@ -115,11 +115,11 @@ got_fileindex_entry_update(struct got_fileindex_entry *ie,
if (S_ISLNK(sb.st_mode)) {
got_fileindex_entry_filetype_set(ie,
GOT_FILEIDX_MODE_SYMLINK);
- got_fileindex_entry_perms_set(ie, 0);
+ fileindex_entry_perms_set(ie, 0);
} else {
got_fileindex_entry_filetype_set(ie,
GOT_FILEIDX_MODE_REGULAR_FILE);
- got_fileindex_entry_perms_set(ie,
+ fileindex_entry_perms_set(ie,
sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO));
}
}