From 598b4cf10cedbf07552deaad0c43792f0300bc3b 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 4eb7564bc..c454efca4 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 40bdbcd8a..060cf4895 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