[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4740-gc1e0d89

Michael Adam obnox at samba.org
Thu Dec 25 22:48:01 GMT 2008


The branch, v3-3-test has been updated
       via  c1e0d89d00885dd227b9cec719f2fb3fbc69aea3 (commit)
       via  c04b8a612c880513971ea5a03c4d0c120bfa6c4a (commit)
      from  60707022622068dd5df5c7b5aa82e0d34ed544f5 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit c1e0d89d00885dd227b9cec719f2fb3fbc69aea3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 24 12:46:26 2008 +0200

    Fix some nonempty blank lines
    (cherry picked from commit 010c7101e59477f0d5f3bf11c17f474ec6f79cc1)
    
    Signed-off-by: Michael Adam <obnox at samba.org>

commit c04b8a612c880513971ea5a03c4d0c120bfa6c4a
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 24 12:43:36 2008 +0200

    Fix some C++ warnings
    (cherry picked from commit dd9e4e6db04acf20f6ef7705955358c7ca442bbd)
    
    Signed-off-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source/lib/dbwrap_ctdb.c |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/dbwrap_ctdb.c b/source/lib/dbwrap_ctdb.c
index 1e3a97f..2818634 100644
--- a/source/lib/dbwrap_ctdb.c
+++ b/source/lib/dbwrap_ctdb.c
@@ -2,17 +2,17 @@
    Unix SMB/CIFS implementation.
    Database interface wrapper around ctdbd
    Copyright (C) Volker Lendecke 2007
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -76,7 +76,7 @@ static NTSTATUS tdb_error_to_ntstatus(struct tdb_context *tdb)
 
 /*
   form a ctdb_rec_data record from a key/data pair
-  
+
   note that header may be NULL. If not NULL then it is included in the data portion
   of the record
  */
@@ -130,7 +130,8 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
 	}
 
 	if (m == NULL) {
-		m = talloc_zero_size(mem_ctx, offsetof(struct ctdb_marshall_buffer, data));
+		m = (struct ctdb_marshall_buffer *)talloc_zero_size(
+			mem_ctx, offsetof(struct ctdb_marshall_buffer, data));
 		if (m == NULL) {
 			return NULL;
 		}
@@ -140,7 +141,8 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
 	m_size = talloc_get_size(m);
 	r_size = talloc_get_size(r);
 
-	m2 = talloc_realloc_size(mem_ctx, m,  m_size + r_size);
+	m2 = (struct ctdb_marshall_buffer *)talloc_realloc_size(
+		mem_ctx, m,  m_size + r_size);
 	if (m2 == NULL) {
 		talloc_free(m);
 		return NULL;
@@ -166,7 +168,7 @@ static TDB_DATA db_ctdb_marshall_finish(struct ctdb_marshall_buffer *m)
 
 /* 
    loop over a marshalling buffer 
-   
+
      - pass r==NULL to start
      - loop the number of times indicated by m->count
 */
@@ -184,7 +186,7 @@ static struct ctdb_rec_data *db_ctdb_marshall_loop_next(struct ctdb_marshall_buf
 	if (reqid != NULL) {
 		*reqid = r->reqid;
 	}
-	
+
 	if (key != NULL) {
 		key->dptr   = &r->data[0];
 		key->dsize  = r->keylen;
@@ -228,7 +230,7 @@ static int db_ctdb_transaction_fetch_start(struct db_ctdb_transaction_handle *h)
 	struct db_ctdb_ctx *ctx = h->ctx;
 	TDB_DATA data;
 
-	key.dptr = discard_const(keyname);
+	key.dptr = (uint8_t *)discard_const(keyname);
 	key.dsize = strlen(keyname);
 
 again:
@@ -491,16 +493,16 @@ static int db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
 			return -1;
 		}
 	}
-		
+
 	h->m_write = db_ctdb_marshall_add(h, h->m_write, h->ctx->db_id, 0, key, &header, data);
 	if (h->m_write == NULL) {
 		DEBUG(0,(__location__ " Failed to add to marshalling record\n"));
 		talloc_free(tmp_ctx);
 		return -1;
 	}
-	
+
 	rec.dsize = data.dsize + sizeof(struct ctdb_ltdb_header);
-	rec.dptr = talloc_size(tmp_ctx, rec.dsize);
+	rec.dptr = (uint8_t *)talloc_size(tmp_ctx, rec.dsize);
 	if (rec.dptr == NULL) {
 		DEBUG(0,(__location__ " Failed to alloc record\n"));
 		talloc_free(tmp_ctx);
@@ -512,7 +514,7 @@ static int db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
 	ret = tdb_store(h->ctx->wtdb->tdb, key, rec, TDB_REPLACE);
 
 	talloc_free(tmp_ctx);
-	
+
 	return ret;
 }
 
@@ -598,7 +600,7 @@ static int ctdb_replay_transaction(struct db_ctdb_transaction_handle *h)
 			talloc_free(tmp_ctx);
 		}
 	}
-	
+
 	return 0;
 
 failed:
@@ -876,7 +878,7 @@ again:
 			   (int)crec->ctdb_ctx->db_id, keystr));
 		TALLOC_FREE(keystr);
 	}
-	
+
 	if (tdb_chainlock(ctx->wtdb->tdb, key) != 0) {
 		DEBUG(3, ("tdb_chainlock failed\n"));
 		TALLOC_FREE(result);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list