summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-10-06 14:50:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:15 -0500
commit695c6fbe007445e8e63c7d820b14322ece3edbf5 (patch)
treebf4990ea67f71bc230b3aeace418e0666b7ee982 /source3/lib/ldb/ldb_tdb
parentfd1cf23567566b65cdeecdbc04f58f29e29edd79 (diff)
downloadsamba-695c6fbe007445e8e63c7d820b14322ece3edbf5.tar.gz
samba-695c6fbe007445e8e63c7d820b14322ece3edbf5.tar.bz2
samba-695c6fbe007445e8e63c7d820b14322ece3edbf5.zip
r19133: More C++ warnings -- Merge across?
(This used to be commit c879ed3d1edffeda629dc1e05031dca91c1a1e30)
Diffstat (limited to 'source3/lib/ldb/ldb_tdb')
-rw-r--r--source3/lib/ldb/ldb_tdb/ldb_tdb.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/lib/ldb/ldb_tdb/ldb_tdb.c b/source3/lib/ldb/ldb_tdb/ldb_tdb.c
index 5d43783903..2dbcb7a811 100644
--- a/source3/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source3/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -219,7 +219,8 @@ static int ltdb_modified(struct ldb_module *module, const struct ldb_dn *dn)
*/
int ltdb_store(struct ldb_module *module, const struct ldb_message *msg, int flgs)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb =
+ talloc_get_type(module->private_data, struct ltdb_private);
TDB_DATA tdb_key, tdb_data;
int ret;
@@ -332,7 +333,8 @@ done:
*/
int ltdb_delete_noindex(struct ldb_module *module, const struct ldb_dn *dn)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb =
+ talloc_get_type(module->private_data, struct ltdb_private);
TDB_DATA tdb_key;
int ret;
@@ -589,7 +591,8 @@ static int msg_delete_element(struct ldb_module *module,
int ltdb_modify_internal(struct ldb_module *module, const struct ldb_message *msg)
{
struct ldb_context *ldb = module->ldb;
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb =
+ talloc_get_type(module->private_data, struct ltdb_private);
TDB_DATA tdb_key, tdb_data;
struct ldb_message *msg2;
unsigned i, j;
@@ -873,7 +876,8 @@ done:
static int ltdb_start_trans(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb =
+ talloc_get_type(module->private_data, struct ltdb_private);
if (tdb_transaction_start(ltdb->tdb) != 0) {
return ltdb_err_map(tdb_error(ltdb->tdb));
@@ -884,7 +888,8 @@ static int ltdb_start_trans(struct ldb_module *module)
static int ltdb_end_trans(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb =
+ talloc_get_type(module->private_data, struct ltdb_private);
if (tdb_transaction_commit(ltdb->tdb) != 0) {
return ltdb_err_map(tdb_error(ltdb->tdb));
@@ -895,7 +900,8 @@ static int ltdb_end_trans(struct ldb_module *module)
static int ltdb_del_trans(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb =
+ talloc_get_type(module->private_data, struct ltdb_private);
if (tdb_transaction_cancel(ltdb->tdb) != 0) {
return ltdb_err_map(tdb_error(ltdb->tdb));