diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2010-09-02 13:27:25 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-08 09:36:22 -0400 |
commit | 039d997b19cffa2f5428bb3d85669ebc5888307a (patch) | |
tree | 0b3e35d1a40e820191bd40461a92828618f81b83 /src/ldb_modules | |
parent | e35fa36e5c005986978cc7463f54dc29d3eacd66 (diff) | |
download | sssd-039d997b19cffa2f5428bb3d85669ebc5888307a.tar.gz sssd-039d997b19cffa2f5428bb3d85669ebc5888307a.tar.bz2 sssd-039d997b19cffa2f5428bb3d85669ebc5888307a.zip |
Dead assignments cleanup in memberof module
Some assignments deleted, two return value inspections were
added.
Ticket: #589
Diffstat (limited to 'src/ldb_modules')
-rw-r--r-- | src/ldb_modules/memberof.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c index c3f57630..1e28593d 100644 --- a/src/ldb_modules/memberof.c +++ b/src/ldb_modules/memberof.c @@ -1712,14 +1712,12 @@ static int mbof_del_execute_cont(struct mbof_del_operation *delop) struct mbof_del_operation *parent; struct mbof_del_ctx *del_ctx; struct mbof_ctx *ctx; - struct ldb_context *ldb; struct mbof_dn_array *new_list; int i; del_ctx = delop->del_ctx; parent = delop->parent; ctx = del_ctx->ctx; - ldb = ldb_module_get_ctx(ctx->module); anc_ctx = talloc_zero(delop, struct mbof_del_ancestors_ctx); if (!anc_ctx) { @@ -2194,11 +2192,9 @@ static int mbof_del_get_next(struct mbof_del_operation *delop, { struct mbof_del_operation *top, *cop; struct mbof_del_ctx *del_ctx; - struct mbof_ctx *ctx; struct mbof_dn *save, *tmp; del_ctx = delop->del_ctx; - ctx = del_ctx->ctx; /* first of all, save the current delop in the history */ save = talloc_zero(del_ctx, struct mbof_dn); @@ -2796,12 +2792,10 @@ static int mbof_mod_delete(struct mbof_mod_ctx *mod_ctx, { struct mbof_del_operation *first; struct mbof_del_ctx *del_ctx; - struct ldb_context *ldb; struct mbof_ctx *ctx; int i, ret; ctx = mod_ctx->ctx; - ldb = ldb_module_get_ctx(ctx->module); del_ctx = talloc_zero(mod_ctx, struct mbof_del_ctx); if (!del_ctx) { @@ -3603,7 +3597,10 @@ static int memberof_init(struct ldb_module *module) /* set syntaxes for member and memberof so that comparisons in filters and * such are done right */ ret = ldb_schema_attribute_add(ldb, DB_MEMBER, 0, LDB_SYNTAX_DN); + if (ret != 0) return LDB_ERR_OPERATIONS_ERROR; + ret = ldb_schema_attribute_add(ldb, DB_MEMBEROF, 0, LDB_SYNTAX_DN); + if (ret != 0) return LDB_ERR_OPERATIONS_ERROR; return ldb_next_init(module); } |