The branch, master has been updated
       via  866279d dsdb: Fix error checking conditions in partition_metadata 
module
       via  6f133c9 librpc: Fix an incompatible pointer type warning
      from  3e92bff s4-provision: Use the s3fs file server by default in 
migrations

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 866279df9f565df32234ffbefce612b711ed747a
Author: Amitay Isaacs <[email protected]>
Date:   Wed May 30 21:07:38 2012 +1000

    dsdb: Fix error checking conditions in partition_metadata module
    
    Thanks to Matthieu Patou <[email protected]> for pointing it out.
    
    Autobuild-User: Amitay Isaacs <[email protected]>
    Autobuild-Date: Wed May 30 17:00:01 CEST 2012 on sn-devel-104

commit 6f133c911f0fa0c75a01ccb02f2857887a56f5c4
Author: Volker Lendecke <[email protected]>
Date:   Wed May 30 21:01:33 2012 +1000

    librpc: Fix an incompatible pointer type warning
    
    Signed-off-by: Amitay Isaacs <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 librpc/ndr/ndr_dnsp.c                              |    6 ++++--
 .../dsdb/samdb/ldb_modules/partition_metadata.c    |   14 +++++++-------
 2 files changed, 11 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_dnsp.c b/librpc/ndr/ndr_dnsp.c
index f7300c8..fcb623a 100644
--- a/librpc/ndr/ndr_dnsp.c
+++ b/librpc/ndr/ndr_dnsp.c
@@ -197,13 +197,15 @@ _PUBLIC_ void ndr_print_dnsp_string_list(struct ndr_print 
*ndr, const char *name
 _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_string_list(struct ndr_pull *ndr, int 
ndr_flags, struct dnsp_string_list *list)
 {
        list->count = 0;
-       list->str = talloc_array(ndr->current_mem_ctx, char *, list->count);
+       list->str = talloc_array(ndr->current_mem_ctx, const char *,
+                                list->count);
        if (! list->str) {
                return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to pull 
dnsp_string_list");
        }
 
        while (ndr->offset < ndr->data_size) {
-               list->str = talloc_realloc(ndr->current_mem_ctx, list->str, 
char *, list->count+1);
+               list->str = talloc_realloc(ndr->current_mem_ctx, list->str,
+                                          const char *, list->count+1);
                if (! list->str) {
                        return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Failed to 
pull dnsp_string_list");
                }
diff --git a/source4/dsdb/samdb/ldb_modules/partition_metadata.c 
b/source4/dsdb/samdb/ldb_modules/partition_metadata.c
index e3f0fb5..76b78dd 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");
        }


-- 
Samba Shared Repository

Reply via email to