mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4:dsdb/ldb_modules: avoid str_list related const warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
de773f3785
commit
cd103d84e6
@ -693,7 +693,8 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
/* Initialise the referrals list */
|
||||
if (ac->referrals == NULL) {
|
||||
ac->referrals = (const char **) str_list_make_empty(ac);
|
||||
char **l = str_list_make_empty(ac);
|
||||
ac->referrals = discard_const_p(const char *, l);
|
||||
if (ac->referrals == NULL) {
|
||||
return ldb_oom(ldb);
|
||||
}
|
||||
|
@ -105,9 +105,11 @@ static int prepare_modules_line(struct ldb_context *ldb,
|
||||
}
|
||||
|
||||
if (backend_mod) {
|
||||
backend_full_list = (const char **)str_list_make_single(tmp_ctx, backend_mod);
|
||||
char **b = str_list_make_single(tmp_ctx, backend_mod);
|
||||
backend_full_list = discard_const_p(const char *, b);
|
||||
} else {
|
||||
backend_full_list = (const char **)str_list_make_empty(tmp_ctx);
|
||||
char **b = str_list_make_empty(tmp_ctx);
|
||||
backend_full_list = discard_const_p(const char *, b);
|
||||
}
|
||||
if (!backend_full_list) {
|
||||
talloc_free(tmp_ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user