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