[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.3-87-g096ffd1

Amitay Isaacs amitay at samba.org
Tue Jul 15 18:47:09 MDT 2014


The branch, 2.5 has been updated
       via  096ffd1e9ba2f869f79c934fe2b68d0bbd097e14 (commit)
      from  99ce67c7caa78baaa48fdd43919ab8e03207e1e9 (commit)

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


- Log -----------------------------------------------------------------
commit 096ffd1e9ba2f869f79c934fe2b68d0bbd097e14
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Jul 14 16:30:18 2014 +1000

    ltdb: Use tdb_null instead of zeroing TDB_DATA variable
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Mon Jul 14 16:01:31 CEST 2014 on sn-devel-104
    
    (Imported from commit 208b2d88c4efacee79fe4d856ee8256c680cad5c)

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

Summary of changes:
 common/ctdb_ltdb.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_ltdb.c b/common/ctdb_ltdb.c
index 500f721..103d89b 100644
--- a/common/ctdb_ltdb.c
+++ b/common/ctdb_ltdb.c
@@ -83,7 +83,6 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
 
 	rec = tdb_fetch(ctdb_db->ltdb->tdb, key);
 	if (rec.dsize < sizeof(*header)) {
-		TDB_DATA d2;
 		/* return an initial header */
 		if (rec.dptr) free(rec.dptr);
 		if (ctdb->vnn_map == NULL) {
@@ -93,12 +92,11 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
 			return -1;
 		}
 		ltdb_initial_header(ctdb_db, key, header);
-		ZERO_STRUCT(d2);
 		if (data) {
-			*data = d2;
+			*data = tdb_null;
 		}
 		if (ctdb_db->persistent || header->dmaster == ctdb_db->ctdb->pnn) {
-			if (ctdb_ltdb_store(ctdb_db, key, header, d2) != 0) {
+			if (ctdb_ltdb_store(ctdb_db, key, header, tdb_null) != 0) {
 				DEBUG(DEBUG_NOTICE,
 				      (__location__ "failed to store initial header\n"));
 			}


-- 
CTDB repository


More information about the samba-cvs mailing list