diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2023-11-27 23:35:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 23:35:41 +0200 |
commit | 2b5f2e24527f04f4255161965ae4099192714b73 (patch) | |
tree | b8edd8485dfcd64c68b12da4221a356acd54a0fa /src/userinfo.c | |
parent | 47f4cac457c3583548c0d7dba402568a1e0871b8 (diff) | |
parent | 95936b647c0283cc6ebd2b685cc5b72889cda8bd (diff) | |
download | bindfs-2b5f2e24527f04f4255161965ae4099192714b73.tar.gz |
Merge pull request #150 from hartwork/macos-ci
Cover macOS in CI + make CI use the right compiler + fix more compile warnings
Diffstat (limited to 'src/userinfo.c')
-rw-r--r-- | src/userinfo.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/userinfo.c b/src/userinfo.c index a3ac91c..68291c1 100644 --- a/src/userinfo.c +++ b/src/userinfo.c @@ -52,13 +52,13 @@ static struct memory_block cache_memory_block = MEMORY_BLOCK_INITIALIZER; static volatile int cache_rebuild_requested = 1; -static void rebuild_cache(); +static void rebuild_cache(void); static struct uid_cache_entry *uid_cache_lookup(uid_t key); static struct gid_cache_entry *gid_cache_lookup(gid_t key); -static int rebuild_uid_cache(); -static int rebuild_gid_cache(); -static void clear_uid_cache(); -static void clear_gid_cache(); +static int rebuild_uid_cache(void); +static int rebuild_gid_cache(void); +static void clear_uid_cache(void); +static void clear_gid_cache(void); static int uid_cache_name_sortcmp(const void *key, const void *entry); static int uid_cache_name_searchcmp(const void *key, const void *entry); static int uid_cache_uid_sortcmp(const void *key, const void *entry); @@ -66,7 +66,7 @@ static int uid_cache_uid_searchcmp(const void *key, const void *entry); static int gid_cache_gid_sortcmp(const void *key, const void *entry); static int gid_cache_gid_searchcmp(const void *key, const void *entry); -static void rebuild_cache() +static void rebuild_cache(void) { free_memory_block(&cache_memory_block); init_memory_block(&cache_memory_block, 1024); @@ -98,7 +98,7 @@ static struct gid_cache_entry *gid_cache_lookup(gid_t key) ); } -static int rebuild_uid_cache() +static int rebuild_uid_cache(void) { /* We're holding the lock, so we have mutual exclusion on getpwent and getgrent too. */ struct passwd *pw; @@ -144,7 +144,7 @@ error: return 0; } -static int rebuild_gid_cache() +static int rebuild_gid_cache(void) { /* We're holding the lock, so we have mutual exclusion on getpwent and getgrent too. */ struct group *gr; @@ -205,12 +205,12 @@ error: return 0; } -static void clear_uid_cache() +static void clear_uid_cache(void) { uid_cache_size = 0; } -static void clear_gid_cache() +static void clear_gid_cache(void) { gid_cache_size = 0; } @@ -361,7 +361,7 @@ done: return ret; } -void invalidate_user_cache() +void invalidate_user_cache(void) { cache_rebuild_requested = 1; } |