[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sat Feb 6 23:57:09 UTC 2016


The branch, master has been updated
       via  1f6495b ctdb/server: fix gcc6 build warning.
       via  1a4b8cc s4-libgpo: fix gcc6 build warning.
       via  3b230d2 s4-torture: fix gcc6 build warnings.
       via  1c80f10 s4-torture: fix gcc6 build warning.
       via  3536a23 s4-torture: fix gcc6 build warning.
       via  a3f7b51 s4-torture: fix gcc6 build warning.
       via  5544756 s4-torture: fix gcc6 build warning.
       via  d44f488 ldb: remove outdated comment about type argument in dlist
       via  310da05 tevent: remove outdated comment about type argument in dlist
       via  025c59d dlist: remove outdated comment about type argument
       via  2fd63ec dlist: remove unneeded type argument from DLIST_CONCATENATE()
       via  0f6c00b tevent: remove unneeded type argument from DLIST_CONCATENATE()
       via  1441824 ldb: remove unneeded argument type from DLIST_CONCATENATE()
       via  be2a341 tevent: remove uneeded type argument from DLIST_DEMOTE()
       via  a1c5d66 ldb: remove uneeded type argument from DLIST_DEMOTE()
       via  d6f5fc8 dlist: remove unneeded argument from DLIST_DEMOTE()
       via  66af807 ldb: remove unneeded type arg from DLIST_ADD_END
       via  a091c0a tevent: remove unneeded type argument from DLIST_ADD_END
       via  476672b dlist: remove unneeded type argument from DLIST_ADD_END()
      from  5d759bd pdb: Fix segfault in pdb_ldap for missing gecos

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


- Log -----------------------------------------------------------------
commit 1f6495b2f5e49e25176f97ef9aa7516403db91d6
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 5 11:39:46 2016 +0100

    ctdb/server: fix gcc6 build warning.
    
    ctdb/server/ipalloc_lcp2.c:264:29: warning: 'minimbl' may be used uninitialized
    in this function [-Wmaybe-uninitialized]
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sun Feb  7 00:56:44 CET 2016 on sn-devel-144

commit 1a4b8cc70772f36b02cf8b464a5364f0196ef0d1
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 5 11:37:45 2016 +0100

    s4-libgpo: fix gcc6 build warning.
    
    source4/lib/policy/gp_ldap.c:48:35: warning: 'gpo_inheritance' defined but not
    used [-Wunused-const-variable]
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 3b230d21bc270bef1c309471749d2081744152cd
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 5 11:36:15 2016 +0100

    s4-torture: fix gcc6 build warnings.
    
    source4/torture/nbt/winsreplication.c:523:30: warning: 'addresses_X_1_2' defined but not used [-Wunused-const-variable]
    source4/torture/nbt/winsreplication.c:470:30: warning: 'addresses_B_2' defined but not used [-Wunused-const-variable]
    source4/torture/nbt/winsreplication.c:445:30: warning: 'addresses_A_3_4_X_1_2' defined but not used [-Wunused-const-variable]
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 1c80f102994901d9af455da9a42a2c66e6839c68
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 5 11:33:32 2016 +0100

    s4-torture: fix gcc6 build warning.
    
    source4/torture/rpc/forest_trust.c:408:22: warning: 'my_blob' defined but not
    used [-Wunused-const-variable]
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 3536a2318f40d7af19c3e364e42c4f816d7a409a
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 5 11:32:17 2016 +0100

    s4-torture: fix gcc6 build warning.
    
    source4/torture/ndr/samr.c:277:22: warning:
    'samr_changepassworduser3_w2k_out_data' defined but not used
    [-Wunused-const-variable]
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a3f7b51688662f049243968e5bb2eef1e9f1801b
Author: Günther Deschner <gd at samba.org>
Date:   Mon Feb 1 16:06:18 2016 +0100

    s4-torture: fix gcc6 build warning.
    
    source4/torture/ndr/drsuapi.c:272:22: warning: 'DsBind_req2_dat' defined but
    not used [-Wunused-const-variable]
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5544756733ced826e1f42fdeae1b67348501668f
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 5 11:14:58 2016 +0100

    s4-torture: fix gcc6 build warning.
    
    source4/torture/raw/eas.c:322:17: warning: comparison of constant '0' with
    boolean expression is always false [-Wbool-compare]
    
    Guenther
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d44f488317b431317963b42993cc56e2289a4d0d
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 12:05:26 2016 +0100

    ldb: remove outdated comment about type argument in dlist
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 310da05710ed498b1657978286ca409ad8487161
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 12:05:06 2016 +0100

    tevent: remove outdated comment about type argument in dlist
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 025c59db066dc6d45beade963254b6be52e85f32
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 12:04:44 2016 +0100

    dlist: remove outdated comment about type argument
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2fd63ec80abd12a25ba652ff338c237c33668e33
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 12:03:33 2016 +0100

    dlist: remove unneeded type argument from DLIST_CONCATENATE()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0f6c00b6aef6ca824696a77d427248d0fa1aad04
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 12:02:54 2016 +0100

    tevent: remove unneeded type argument from DLIST_CONCATENATE()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 1441824fe6a797e53fb182b00017a0f927ec42bf
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 12:02:26 2016 +0100

    ldb: remove unneeded argument type from DLIST_CONCATENATE()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit be2a341d43158999667de90f7c84b6c21d6c5dc6
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 11:53:30 2016 +0100

    tevent: remove uneeded type argument from DLIST_DEMOTE()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a1c5d662d4846a66f70d9a48b86fdda95264b30e
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 11:53:11 2016 +0100

    ldb: remove uneeded type argument from DLIST_DEMOTE()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d6f5fc8c2d3db3daa2209850ef0487e822c7bb92
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 11:52:36 2016 +0100

    dlist: remove unneeded argument from DLIST_DEMOTE()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 66af807fc45114d422d73c751a94e72117555113
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 11:35:38 2016 +0100

    ldb: remove unneeded type arg from DLIST_ADD_END
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a091c0ac6891a1ec3e15af7808a9c19533bcfb7c
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 11:37:42 2016 +0100

    tevent: remove unneeded type argument from DLIST_ADD_END
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 476672b647e44898a6de8894b23e598ad13b1fcf
Author: Michael Adam <obnox at samba.org>
Date:   Fri Feb 5 11:32:18 2016 +0100

    dlist: remove unneeded type argument from DLIST_ADD_END()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 ctdb/common/ctdb_io.c                              |  2 +-
 ctdb/server/ctdb_call.c                            |  4 ++--
 ctdb/server/ctdb_daemon.c                          |  2 +-
 ctdb/server/ctdb_lock.c                            |  8 ++++----
 ctdb/server/ctdb_logging.c                         |  2 +-
 ctdb/server/ipalloc_lcp2.c                         |  3 ++-
 lib/ldb/common/ldb_match.c                         |  2 +-
 lib/ldb/common/ldb_modules.c                       |  6 +++---
 lib/ldb/include/dlinklist.h                        | 15 ++++-----------
 lib/tevent/tevent_immediate.c                      |  2 +-
 lib/tevent/tevent_poll.c                           |  2 +-
 lib/tevent/tevent_queue.c                          |  2 +-
 lib/tevent/tevent_select.c                         |  2 +-
 lib/tevent/tevent_util.h                           | 15 ++++-----------
 lib/torture/torture.c                              | 14 +++++++-------
 lib/util/dlinklist.h                               | 15 ++++-----------
 lib/util/tests/dlinklist.c                         |  8 ++++----
 libcli/cldap/cldap.c                               |  2 +-
 libcli/nbt/nbtsocket.c                             |  7 +++----
 libcli/smb/smbXcli_base.c                          |  6 +++---
 source3/auth/auth.c                                |  2 +-
 source3/auth/pampass.c                             |  2 +-
 source3/lib/events.c                               |  2 +-
 source3/lib/smbldap.c                              |  2 +-
 source3/lib/unix_msg/unix_msg.c                    |  2 +-
 source3/lib/util_ea.c                              |  2 +-
 source3/libsmb/clidfs.c                            |  2 +-
 source3/libsmb/clireadwrite.c                      |  4 ++--
 source3/modules/vfs_aio_pthread.c                  |  2 +-
 source3/nmbd/nmbd_browserdb.c                      |  2 +-
 source3/nmbd/nmbd_packets.c                        |  2 +-
 source3/nmbd/nmbd_responserecordsdb.c              |  2 +-
 source3/nmbd/nmbd_serverlistdb.c                   |  2 +-
 source3/param/loadparm.c                           |  2 +-
 source3/printing/notify.c                          |  2 +-
 source3/registry/regfio.c                          |  2 +-
 source3/rpc_server/fss/srv_fss_agent.c             |  9 ++++-----
 source3/rpc_server/fss/srv_fss_state.c             | 12 ++++++------
 source3/smbd/blocking.c                            |  2 +-
 source3/smbd/notify.c                              |  3 +--
 source3/smbd/posix_acls.c                          | 12 ++++++------
 source3/smbd/process.c                             |  5 ++---
 source3/smbd/server.c                              |  2 +-
 source3/smbd/smb2_server.c                         | 10 +++++-----
 source3/smbd/smbXsrv_session.c                     |  2 +-
 source3/smbd/trans2.c                              |  6 +++---
 source3/winbindd/winbindd_util.c                   |  2 +-
 source4/auth/ntlm/auth.c                           |  2 +-
 source4/dns_server/dnsserver_common.c              |  2 +-
 source4/dsdb/common/util_trusts.c                  |  2 +-
 source4/dsdb/kcc/kcc_drs_replica_info.c            |  2 +-
 source4/dsdb/repl/drepl_notify.c                   |  2 +-
 source4/dsdb/repl/drepl_out_pull.c                 |  2 +-
 source4/dsdb/repl/drepl_partitions.c               |  4 ++--
 source4/dsdb/repl/replicated_objects.c             |  2 +-
 source4/dsdb/samdb/ldb_modules/descriptor.c        |  4 ++--
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |  2 +-
 source4/dsdb/samdb/ldb_modules/secrets_tdb_sync.c  |  2 +-
 source4/dsdb/samdb/ldb_modules/update_keytab.c     |  2 +-
 source4/dsdb/schema/schema_query.c                 |  8 ++++----
 source4/ldap_server/ldap_backend.c                 |  2 +-
 source4/lib/http/http.c                            |  2 +-
 source4/lib/policy/gp_ldap.c                       |  6 ------
 source4/lib/socket/interface.c                     |  2 +-
 source4/lib/stream/packet.c                        |  2 +-
 source4/libcli/dgram/dgramsocket.c                 |  2 +-
 source4/libcli/resolve/resolve.c                   |  2 +-
 source4/librpc/rpc/dcerpc.c                        |  6 +++---
 source4/nbt_server/register.c                      |  2 +-
 source4/nbt_server/wins/winsserver.c               |  2 +-
 source4/ntvfs/ntvfs_base.c                         |  2 +-
 source4/ntvfs/posix/pvfs_notify.c                  |  2 +-
 source4/rpc_server/common/reply.c                  | 10 +++++-----
 source4/rpc_server/dcerpc_server.c                 | 14 +++++++-------
 source4/rpc_server/dnsserver/dcerpc_dnsserver.c    |  6 +++---
 source4/rpc_server/dnsserver/dnsdb.c               |  6 +++---
 source4/smb_server/smb2/receive.c                  |  2 +-
 source4/smb_server/smb_server.h                    |  2 +-
 source4/smbd/service.c                             |  2 +-
 source4/torture/local/fsrvp_state.c                | 20 ++++++++++----------
 source4/torture/nbench/nbio.c                      |  4 ++--
 source4/torture/nbt/wins.c                         |  3 +--
 source4/torture/nbt/winsreplication.c              |  9 +++++++--
 source4/torture/ndr/drsuapi.c                      |  4 ++++
 source4/torture/ndr/ndr.c                          |  4 ++--
 source4/torture/ndr/samr.c                         |  2 ++
 source4/torture/raw/eas.c                          |  6 +-----
 source4/torture/rpc/forest_trust.c                 |  3 ++-
 source4/torture/rpc/spoolss_notify.c               |  2 +-
 source4/torture/smb2/smb2.c                        |  4 ++--
 source4/torture/util_smb.c                         |  6 +++---
 source4/torture/vfs/vfs.c                          |  2 +-
 source4/wrepl_server/wrepl_server.c                |  4 ++--
 93 files changed, 189 insertions(+), 212 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c
index 24968b3..894935e 100644
--- a/ctdb/common/ctdb_io.c
+++ b/ctdb/common/ctdb_io.c
@@ -352,7 +352,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length)
 		TEVENT_FD_WRITEABLE(queue->fde);
 	}
 
-	DLIST_ADD_END(queue->out_queue, pkt, NULL);
+	DLIST_ADD_END(queue->out_queue, pkt);
 
 	queue->out_queue_length++;
 
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index db9fb6a..453b456 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -565,7 +565,7 @@ static int dmaster_defer_add(struct ctdb_db_context *ctdb_db,
 	call->ctdb = ctdb_db->ctdb;
 	call->hdr = talloc_steal(call, hdr);
 
-	DLIST_ADD_END(ddq->deferred_calls, call, NULL);
+	DLIST_ADD_END(ddq->deferred_calls, call);
 
 	return 0;
 }
@@ -1911,7 +1911,7 @@ child_finished:
 	set_close_on_exec(rc->fd[0]);
 
 	/* This is an active revokechild child process */
-	DLIST_ADD_END(ctdb_db->revokechild_active, rc, NULL);
+	DLIST_ADD_END(ctdb_db->revokechild_active, rc);
 
 	rc->fde = tevent_add_fd(ctdb->ev, rc, rc->fd[0], TEVENT_FD_READ,
 				revokechild_handler, (void *)rc);
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 36dcfad..9a33691 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -590,7 +590,7 @@ static int requeue_duplicate_fetch(struct ctdb_db_context *ctdb_db, struct ctdb_
 	dfc->w->ctdb = ctdb_db->ctdb;
 	dfc->w->client_id = client->client_id;
 
-	DLIST_ADD_END(dfq->deferred_calls, dfc, NULL);
+	DLIST_ADD_END(dfq->deferred_calls, dfc);
 
 	return 0;
 }
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 78ba35c..7962e94 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -902,10 +902,10 @@ static void ctdb_lock_schedule(struct ctdb_context *ctdb)
 	/* Move the context from pending to current */
 	if (lock_ctx->type == LOCK_RECORD) {
 		DLIST_REMOVE(lock_ctx->ctdb_db->lock_pending, lock_ctx);
-		DLIST_ADD_END(lock_ctx->ctdb_db->lock_current, lock_ctx, NULL);
+		DLIST_ADD_END(lock_ctx->ctdb_db->lock_current, lock_ctx);
 	} else {
 		DLIST_REMOVE(ctdb->lock_pending, lock_ctx);
-		DLIST_ADD_END(ctdb->lock_current, lock_ctx, NULL);
+		DLIST_ADD_END(ctdb->lock_current, lock_ctx);
 	}
 	CTDB_DECREMENT_STAT(lock_ctx->ctdb, locks.num_pending);
 	CTDB_INCREMENT_STAT(lock_ctx->ctdb, locks.num_current);
@@ -975,9 +975,9 @@ static struct lock_request *ctdb_lock_internal(TALLOC_CTX *mem_ctx,
 	 * immediately, so keep them at the head of the pending queue.
 	 */
 	if (lock_ctx->type == LOCK_RECORD) {
-		DLIST_ADD_END(ctdb_db->lock_pending, lock_ctx, NULL);
+		DLIST_ADD_END(ctdb_db->lock_pending, lock_ctx);
 	} else {
-		DLIST_ADD_END(ctdb->lock_pending, lock_ctx, NULL);
+		DLIST_ADD_END(ctdb->lock_pending, lock_ctx);
 	}
 	CTDB_INCREMENT_STAT(ctdb, locks.num_pending);
 	if (ctdb_db) {
diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c
index 29b1982..1819ab7 100644
--- a/ctdb/server/ctdb_logging.c
+++ b/ctdb/server/ctdb_logging.c
@@ -71,7 +71,7 @@ void ctdb_log_register_backend(const char *prefix, ctdb_log_setup_fn_t setup)
 	b->prefix = prefix;
 	b->setup = setup;
 
-	DLIST_ADD_END(log_state->backends, b, NULL);
+	DLIST_ADD_END(log_state->backends, b);
 }
 
 
diff --git a/ctdb/server/ipalloc_lcp2.c b/ctdb/server/ipalloc_lcp2.c
index 0dd9364..a4b3bdb 100644
--- a/ctdb/server/ipalloc_lcp2.c
+++ b/ctdb/server/ipalloc_lcp2.c
@@ -201,7 +201,8 @@ static void lcp2_allocate_unassigned(struct ipalloc_state *ipalloc_state,
 	int dstnode, numnodes;
 
 	int minnode;
-	uint32_t mindsum, dstdsum, dstimbl, minimbl;
+	uint32_t mindsum, dstdsum, dstimbl;
+	uint32_t minimbl = 0;
 	struct public_ip_list *minip;
 
 	bool should_loop = true;
diff --git a/lib/ldb/common/ldb_match.c b/lib/ldb/common/ldb_match.c
index c4f5580..e83ad63 100644
--- a/lib/ldb/common/ldb_match.c
+++ b/lib/ldb/common/ldb_match.c
@@ -713,7 +713,7 @@ int ldb_register_extended_match_rule(struct ldb_context *ldb,
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	entry->rule = rule;
-	DLIST_ADD_END(ldb->extended_match_rules, entry, struct ldb_extended_match_entry);
+	DLIST_ADD_END(ldb->extended_match_rules, entry);
 
 	return LDB_SUCCESS;
 }
diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c
index 91412a6..2105966 100644
--- a/lib/ldb/common/ldb_modules.c
+++ b/lib/ldb/common/ldb_modules.c
@@ -162,7 +162,7 @@ int ldb_register_backend(const char *url_prefix, ldb_connect_fn connectfn, bool
 			talloc_free(be);
 			return LDB_ERR_OPERATIONS_ERROR;
 		}
-		DLIST_ADD_END(ldb_backends, be, struct backends_list_entry);
+		DLIST_ADD_END(ldb_backends, be);
 	}
 
 	be->ops->name = url_prefix;
@@ -240,7 +240,7 @@ int ldb_register_hook(ldb_hook_fn hook_fn)
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	lc->hook_fn = hook_fn;
-	DLIST_ADD_END(ldb_hooks, lc, struct ldb_hooks);
+	DLIST_ADD_END(ldb_hooks, lc);
 	return LDB_SUCCESS;
 }
 
@@ -926,7 +926,7 @@ static int ldb_modules_load_path(const char *path, const char *version)
 	le->st_ino = st.st_ino;
 	le->st_dev = st.st_dev;
 
-	DLIST_ADD_END(loaded, le, struct loaded);
+	DLIST_ADD_END(loaded, le);
 
 	/* if it is a directory, recurse */
 	if (S_ISDIR(st.st_mode)) {
diff --git a/lib/ldb/include/dlinklist.h b/lib/ldb/include/dlinklist.h
index f640b0f..ef01aec 100644
--- a/lib/ldb/include/dlinklist.h
+++ b/lib/ldb/include/dlinklist.h
@@ -57,10 +57,6 @@
   This allows us to find the tail of the list by using
   list_head->prev, which means we can add to the end of the list in
   O(1) time
-
-
-  Note that the 'type' arguments below are no longer needed, but
-  are kept for now to prevent an incompatible argument change
  */
 
 
@@ -135,9 +131,8 @@ do { \
 
 /*
    add to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_ADD_END(list, p, type)			\
+#define DLIST_ADD_END(list, p) \
 do { \
 	if (!(list)) { \
 		DLIST_ADD(list, p); \
@@ -155,20 +150,18 @@ do { \
 
 /*
    demote an element to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_DEMOTE(list, p, type)			\
+#define DLIST_DEMOTE(list, p) \
 do { \
 	DLIST_REMOVE(list, p); \
-	DLIST_ADD_END(list, p, NULL);		\
+	DLIST_ADD_END(list, p); \
 } while (0)
 
 /*
    concatenate two lists - putting all elements of the 2nd list at the
    end of the first list.
-   Note that 'type' is ignored
 */
-#define DLIST_CONCATENATE(list1, list2, type)	\
+#define DLIST_CONCATENATE(list1, list2) \
 do { \
 	if (!(list1)) { \
 		(list1) = (list2); \
diff --git a/lib/tevent/tevent_immediate.c b/lib/tevent/tevent_immediate.c
index 1ac293e..9ff5322 100644
--- a/lib/tevent/tevent_immediate.c
+++ b/lib/tevent/tevent_immediate.c
@@ -88,7 +88,7 @@ void tevent_common_schedule_immediate(struct tevent_immediate *im,
 	im->cancel_fn		= NULL;
 	im->additional_data	= NULL;
 
-	DLIST_ADD_END(ev->immediate_events, im, struct tevent_immediate *);
+	DLIST_ADD_END(ev->immediate_events, im);
 	talloc_set_destructor(im, tevent_common_immediate_destructor);
 
 	tevent_debug(ev, TEVENT_DEBUG_TRACE,
diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index 9b1781f..e1c305d 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -601,7 +601,7 @@ static int poll_event_loop_poll(struct tevent_context *ev,
 		 */
 		flags &= fde->flags;
 		if (flags != 0) {
-			DLIST_DEMOTE(ev->fd_events, fde, struct tevent_fd);
+			DLIST_DEMOTE(ev->fd_events, fde);
 			fde->handler(ev, fde, flags, fde->private_data);
 			return 0;
 		}
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
index 35742e5..cefe91a 100644
--- a/lib/tevent/tevent_queue.c
+++ b/lib/tevent/tevent_queue.c
@@ -195,7 +195,7 @@ static struct tevent_queue_entry *tevent_queue_add_internal(
 		allow_direct = false;
 	}
 
-	DLIST_ADD_END(queue->list, e, struct tevent_queue_entry *);
+	DLIST_ADD_END(queue->list, e);
 	queue->length++;
 	talloc_set_destructor(e, tevent_queue_entry_destructor);
 
diff --git a/lib/tevent/tevent_select.c b/lib/tevent/tevent_select.c
index 40a4dc0..ec7565d 100644
--- a/lib/tevent/tevent_select.c
+++ b/lib/tevent/tevent_select.c
@@ -219,7 +219,7 @@ static int select_event_loop_select(struct select_event_context *select_ev, stru
 				flags |= TEVENT_FD_WRITE;
 			}
 			if (flags) {
-				DLIST_DEMOTE(select_ev->ev->fd_events, fde, struct tevent_fd);
+				DLIST_DEMOTE(select_ev->ev->fd_events, fde);
 				fde->handler(select_ev->ev, fde, flags, fde->private_data);
 				break;
 			}
diff --git a/lib/tevent/tevent_util.h b/lib/tevent/tevent_util.h
index 6f91983..e2cdbb8 100644
--- a/lib/tevent/tevent_util.h
+++ b/lib/tevent/tevent_util.h
@@ -53,10 +53,6 @@
   This allows us to find the tail of the list by using
   list_head->prev, which means we can add to the end of the list in
   O(1) time
-
-
-  Note that the 'type' arguments below are no longer needed, but
-  are kept for now to prevent an incompatible argument change
  */
 
 
@@ -131,9 +127,8 @@ do { \
 
 /*
    add to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_ADD_END(list, p, type)			\
+#define DLIST_ADD_END(list, p) \
 do { \
 	if (!(list)) { \
 		DLIST_ADD(list, p); \
@@ -151,20 +146,18 @@ do { \
 
 /*
    demote an element to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_DEMOTE(list, p, type)			\
+#define DLIST_DEMOTE(list, p) \
 do { \
 	DLIST_REMOVE(list, p); \
-	DLIST_ADD_END(list, p, NULL);		\
+	DLIST_ADD_END(list, p); \
 } while (0)
 
 /*
    concatenate two lists - putting all elements of the 2nd list at the
    end of the first list.
-   Note that 'type' is ignored
 */
-#define DLIST_CONCATENATE(list1, list2, type)	\
+#define DLIST_CONCATENATE(list1, list2) \
 do { \
 	if (!(list1)) { \
 		(list1) = (list2); \
diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index 78d8261..40807d9 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -277,7 +277,7 @@ struct torture_test *torture_tcase_add_test_const(struct torture_tcase *tcase,
 	test->dangerous = false;
 	test->data = data;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return test;
 }
@@ -296,7 +296,7 @@ bool torture_suite_init_tcase(struct torture_suite *suite,
 	tcase->fixture_persistent = true;
 	tcase->tests = NULL;
 
-	DLIST_ADD_END(suite->testcases, tcase, struct torture_tcase *);
+	DLIST_ADD_END(suite->testcases, tcase);
 
 	return true;
 }
@@ -617,7 +617,7 @@ struct torture_tcase *torture_suite_add_simple_tcase_const(
 	test->data = data;
 	test->dangerous = false;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return tcase;
 }
@@ -651,7 +651,7 @@ struct torture_tcase *torture_suite_add_simple_test(
 	test->fn = run;
 	test->dangerous = false;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return tcase;
 }
@@ -665,7 +665,7 @@ bool torture_suite_add_suite(struct torture_suite *suite,
 	if (child == NULL)
 		return false;
 
-	DLIST_ADD_END(suite->children, child, struct torture_suite *);
+	DLIST_ADD_END(suite->children, child);
 
 	/* FIXME: Check for duplicates and return false if the 
 	 * added suite already exists as a child */
@@ -716,7 +716,7 @@ struct torture_test *torture_tcase_add_simple_test_const(
 	test->data = NULL;
 	test->dangerous = false;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return test;
 }
@@ -747,7 +747,7 @@ struct torture_test *torture_tcase_add_simple_test(struct torture_tcase *tcase,
 	test->data = NULL;
 	test->dangerous = false;
 
-	DLIST_ADD_END(tcase->tests, test, struct torture_test *);
+	DLIST_ADD_END(tcase->tests, test);
 
 	return test;
 }
diff --git a/lib/util/dlinklist.h b/lib/util/dlinklist.h
index 5520901..8a1b84d 100644
--- a/lib/util/dlinklist.h
+++ b/lib/util/dlinklist.h
@@ -53,10 +53,6 @@
   This allows us to find the tail of the list by using
   list_head->prev, which means we can add to the end of the list in
   O(1) time
-
-
-  Note that the 'type' arguments below are no longer needed, but
-  are kept for now to prevent an incompatible argument change
  */
 
 
@@ -131,9 +127,8 @@ do { \
 
 /*
    add to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_ADD_END(list, p, type)			\
+#define DLIST_ADD_END(list, p) \
 do { \
 	if (!(list)) { \
 		DLIST_ADD(list, p); \
@@ -151,20 +146,18 @@ do { \
 
 /*
    demote an element to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_DEMOTE(list, p, type)			\
+#define DLIST_DEMOTE(list, p) \
 do { \
 	DLIST_REMOVE(list, p); \
-	DLIST_ADD_END(list, p, NULL);		\
+	DLIST_ADD_END(list, p); \
 } while (0)
 
 /*
    concatenate two lists - putting all elements of the 2nd list at the
    end of the first list.
-   Note that 'type' is ignored
 */
-#define DLIST_CONCATENATE(list1, list2, type)	\
+#define DLIST_CONCATENATE(list1, list2) \
 do { \
 	if (!(list1)) { \
 		(list1) = (list2); \
diff --git a/lib/util/tests/dlinklist.c b/lib/util/tests/dlinklist.c
index bef61d2..50adab3 100644
--- a/lib/util/tests/dlinklist.c
+++ b/lib/util/tests/dlinklist.c
@@ -43,7 +43,7 @@ static bool torture_local_dlinklist_simple(struct torture_context *tctx)
 	torture_comment(tctx, "add 5 elements at end\n");
 	for (i=0; i<5; i++) {
 		el = talloc(mem_ctx, struct listel);
-		DLIST_ADD_END(l1, el, NULL);
+		DLIST_ADD_END(l1, el);
 	}
 
 	torture_comment(tctx, "delete 3 from front\n");
@@ -57,7 +57,7 @@ static bool torture_local_dlinklist_simple(struct torture_context *tctx)
 	for (i=0; i < 3; i++) {
 		el = DLIST_TAIL(l1);
 		DLIST_REMOVE(l1, el);
-		DLIST_ADD_END(l2, el, NULL);
+		DLIST_ADD_END(l2, el);
 	}
 
 	torture_comment(tctx, "count forward\n");
@@ -87,7 +87,7 @@ static bool torture_local_dlinklist_simple(struct torture_context *tctx)
 	torture_assert(tctx, el2->next->next == el, "3rd in list");
 
 	torture_comment(tctx, "check DLIST_DEMOTE\n");
-	DLIST_DEMOTE(l1, el, NULL);
+	DLIST_DEMOTE(l1, el);
 	torture_assert(tctx, el->next == NULL, "last in list");
 	torture_assert(tctx, el2->prev == el, "backlink from head");
 
@@ -100,7 +100,7 @@ static bool torture_local_dlinklist_simple(struct torture_context *tctx)
 	torture_assert_int_equal(tctx, i, 6, "should have 6 elements");
 
 	torture_comment(tctx, "check DLIST_CONCATENATE\n");
-	DLIST_CONCATENATE(l1, l2, NULL);
+	DLIST_CONCATENATE(l1, l2);
 	torture_comment(tctx, "count forward\n");
 	for (i=0,el=l1; el; el=el->next) i++;
 	torture_assert_int_equal(tctx, i, 12, "should have 12 elements");
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index dd9d40b..c5977cc 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -675,7 +675,7 @@ struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx,
 	}
 	tevent_req_set_callback(subreq, cldap_search_state_queue_done, req);
 
-	DLIST_ADD_END(cldap->searches.list, state, struct cldap_search_state *);
+	DLIST_ADD_END(cldap->searches.list, state);
 
 	return req;
 
diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c
index 6c62739..dacacae 100644
--- a/libcli/nbt/nbtsocket.c
+++ b/libcli/nbt/nbtsocket.c
@@ -127,8 +127,7 @@ static void nbt_name_socket_timeout(struct tevent_context *ev, struct tevent_tim
 					   nbt_name_socket_timeout, req);
 		if (req->state != NBT_REQUEST_SEND) {
 			req->state = NBT_REQUEST_SEND;
-			DLIST_ADD_END(req->nbtsock->send_queue, req,
-				      struct nbt_name_request *);
+			DLIST_ADD_END(req->nbtsock->send_queue, req);
 		}
 		TEVENT_FD_WRITEABLE(req->nbtsock->fde);
 		return;
@@ -418,7 +417,7 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock,
 				       (ndr_push_flags_fn_t)ndr_push_nbt_name_packet);
 	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) goto failed;
 
-	DLIST_ADD_END(nbtsock->send_queue, req, struct nbt_name_request *);
+	DLIST_ADD_END(nbtsock->send_queue, req);
 
 	if (DEBUGLVL(10)) {
 		DEBUG(10,("Queueing nbt packet to %s:%d\n",
@@ -469,7 +468,7 @@ _PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
 		return ndr_map_error2ntstatus(ndr_err);
 	}
 
-	DLIST_ADD_END(nbtsock->send_queue, req, struct nbt_name_request *);
+	DLIST_ADD_END(nbtsock->send_queue, req);
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list