summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-05-30 21:07:38 +1000
committerAmitay Isaacs <amitay@samba.org>2012-05-30 17:00:00 +0200
commit866279df9f565df32234ffbefce612b711ed747a (patch)
treefd35b707ae2790fea950c13251cd9d65262f72c7
parent6f133c911f0fa0c75a01ccb02f2857887a56f5c4 (diff)
downloadsamba-866279df9f565df32234ffbefce612b711ed747a.tar.gz
samba-866279df9f565df32234ffbefce612b711ed747a.tar.bz2
samba-866279df9f565df32234ffbefce612b711ed747a.zip
dsdb: Fix error checking conditions in partition_metadata module
Thanks to Matthieu Patou <mat@matws.net> for pointing it out. Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed May 30 17:00:01 CEST 2012 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition_metadata.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition_metadata.c b/source4/dsdb/samdb/ldb_modules/partition_metadata.c
index e3f0fb5c01..76b78dd13f 100644
--- a/source4/dsdb/samdb/ldb_modules/partition_metadata.c
+++ b/source4/dsdb/samdb/ldb_modules/partition_metadata.c
@@ -39,7 +39,7 @@ static int partition_metadata_get_uint64(struct ldb_module *module,
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata && !data->metadata->db) {
+ if (!data || !data->metadata || !data->metadata->db) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata tdb not initialized");
}
@@ -98,7 +98,7 @@ static int partition_metadata_set_uint64(struct ldb_module *module,
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata && !data->metadata->db) {
+ if (!data || !data->metadata || !data->metadata->db) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata tdb not initialized");
}
@@ -359,7 +359,7 @@ int partition_metadata_sequence_number_increment(struct ldb_module *module, uint
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata) {
+ if (!data || !data->metadata) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata not initialized");
}
@@ -390,7 +390,7 @@ int partition_metadata_start_trans(struct ldb_module *module)
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata && !data->metadata->db) {
+ if (!data || !data->metadata || !data->metadata->db) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata not initialized");
}
@@ -417,7 +417,7 @@ int partition_metadata_prepare_commit(struct ldb_module *module)
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata && !data->metadata->db) {
+ if (!data || !data->metadata || !data->metadata->db) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata not initialized");
}
@@ -447,7 +447,7 @@ int partition_metadata_end_trans(struct ldb_module *module)
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata && !data->metadata->db) {
+ if (!data || !data->metadata || !data->metadata->db) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata not initialized");
}
@@ -479,7 +479,7 @@ int partition_metadata_del_trans(struct ldb_module *module)
data = talloc_get_type_abort(ldb_module_get_private(module),
struct partition_private_data);
- if (!data && !data->metadata && !data->metadata->db) {
+ if (!data || !data->metadata || !data->metadata->db) {
return ldb_module_error(module, LDB_ERR_OPERATIONS_ERROR,
"partition_metadata: metadata not initialized");
}