summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctx.c8
-rw-r--r--pwcache.c12
-rw-r--r--pwcache.h8
3 files changed, 14 insertions, 14 deletions
diff --git a/ctx.c b/ctx.c
index 065abcd..aafc08b 100644
--- a/ctx.c
+++ b/ctx.c
@@ -72,7 +72,7 @@ const struct bfs_users *bfs_ctx_users(const struct bfs_ctx *ctx) {
if (mut->users_error) {
errno = mut->users_error;
} else if (!mut->users) {
- mut->users = bfs_parse_users();
+ mut->users = bfs_users_parse();
if (!mut->users) {
mut->users_error = errno;
}
@@ -87,7 +87,7 @@ const struct bfs_groups *bfs_ctx_groups(const struct bfs_ctx *ctx) {
if (mut->groups_error) {
errno = mut->groups_error;
} else if (!mut->groups) {
- mut->groups = bfs_parse_groups();
+ mut->groups = bfs_groups_parse();
if (!mut->groups) {
mut->groups_error = errno;
}
@@ -186,8 +186,8 @@ int bfs_ctx_free(struct bfs_ctx *ctx) {
bfs_mtab_free(ctx->mtab);
- bfs_free_groups(ctx->groups);
- bfs_free_users(ctx->users);
+ bfs_groups_free(ctx->groups);
+ bfs_users_free(ctx->users);
struct trie_leaf *leaf;
while ((leaf = trie_first_leaf(&ctx->files))) {
diff --git a/pwcache.c b/pwcache.c
index 70869bb..c6e4b5d 100644
--- a/pwcache.c
+++ b/pwcache.c
@@ -32,7 +32,7 @@ struct bfs_users {
struct trie by_uid;
};
-struct bfs_users *bfs_parse_users(void) {
+struct bfs_users *bfs_users_parse(void) {
int error;
struct bfs_users *users = malloc(sizeof(*users));
@@ -103,7 +103,7 @@ struct bfs_users *bfs_parse_users(void) {
fail_end:
endpwent();
fail_free:
- bfs_free_users(users);
+ bfs_users_free(users);
errno = error;
return NULL;
}
@@ -126,7 +126,7 @@ const struct passwd *bfs_getpwuid(const struct bfs_users *users, uid_t uid) {
}
}
-void bfs_free_users(struct bfs_users *users) {
+void bfs_users_free(struct bfs_users *users) {
if (users) {
trie_destroy(&users->by_uid);
trie_destroy(&users->by_name);
@@ -163,7 +163,7 @@ static char *next_gr_mem(void **gr_mem) {
return mem;
}
-struct bfs_groups *bfs_parse_groups(void) {
+struct bfs_groups *bfs_groups_parse(void) {
int error;
struct bfs_groups *groups = malloc(sizeof(*groups));
@@ -249,7 +249,7 @@ struct bfs_groups *bfs_parse_groups(void) {
fail_end:
endgrent();
fail_free:
- bfs_free_groups(groups);
+ bfs_groups_free(groups);
errno = error;
return NULL;
}
@@ -272,7 +272,7 @@ const struct group *bfs_getgrgid(const struct bfs_groups *groups, gid_t gid) {
}
}
-void bfs_free_groups(struct bfs_groups *groups) {
+void bfs_groups_free(struct bfs_groups *groups) {
if (groups) {
trie_destroy(&groups->by_gid);
trie_destroy(&groups->by_name);
diff --git a/pwcache.h b/pwcache.h
index 23f8c9f..f1a1db3 100644
--- a/pwcache.h
+++ b/pwcache.h
@@ -35,7 +35,7 @@ struct bfs_users;
* @return
* The parsed user table, or NULL on failure.
*/
-struct bfs_users *bfs_parse_users(void);
+struct bfs_users *bfs_users_parse(void);
/**
* Get a user entry by name.
@@ -67,7 +67,7 @@ const struct passwd *bfs_getpwuid(const struct bfs_users *users, uid_t uid);
* @param users
* The user table to free.
*/
-void bfs_free_users(struct bfs_users *users);
+void bfs_users_free(struct bfs_users *users);
/**
* The group table.
@@ -80,7 +80,7 @@ struct bfs_groups;
* @return
* The parsed group table, or NULL on failure.
*/
-struct bfs_groups *bfs_parse_groups(void);
+struct bfs_groups *bfs_groups_parse(void);
/**
* Get a group entry by name.
@@ -112,6 +112,6 @@ const struct group *bfs_getgrgid(const struct bfs_groups *groups, gid_t gid);
* @param groups
* The group table to free.
*/
-void bfs_free_groups(struct bfs_groups *groups);
+void bfs_groups_free(struct bfs_groups *groups);
#endif // BFS_PWCACHE_H