From 665e79e9995073df77660df656b255576f98759e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 17 Aug 2008 08:22:56 -0500 Subject: [PATCH] privilegeset_ref(): return the privilegeset --- include/privilege.h | 2 +- src/privilege.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/privilege.h b/include/privilege.h index 4eb7564..c454efc 100644 --- a/include/privilege.h +++ b/include/privilege.h @@ -42,7 +42,7 @@ int privilegeset_in_set(struct PrivilegeSet *set, const char *priv); struct PrivilegeSet *privilegeset_set_new(const char *name, const char *privs, PrivilegeFlags flags); struct PrivilegeSet *privilegeset_extend(struct PrivilegeSet *parent, const char *name, const char *privs, PrivilegeFlags flags); struct PrivilegeSet *privilegeset_get(const char *name); -void privilegeset_ref(struct PrivilegeSet *set); +struct PrivilegeSet *privilegeset_ref(struct PrivilegeSet *set); void privilegeset_unref(struct PrivilegeSet *set); #endif diff --git a/src/privilege.c b/src/privilege.c index 40bdbcd..060cf48 100644 --- a/src/privilege.c +++ b/src/privilege.c @@ -95,12 +95,14 @@ privilegeset_get(const char *name) return NULL; } -void +struct PrivilegeSet * privilegeset_ref(struct PrivilegeSet *set) { s_assert(set != NULL); set->refs++; + + return set; } void