summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-16 08:49:22 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-16 08:49:22 +0100
commit559575fe40c2d0d860868276c42efacb46dc59aa (patch)
tree31881b0df410b0aa90fa001e011e0b0374834a7c
parent2a04aa08c642bc8b2a556c050a05dc69d6c5247c (diff)
downloadsamba-559575fe40c2d0d860868276c42efacb46dc59aa.tar.gz
samba-559575fe40c2d0d860868276c42efacb46dc59aa.tar.xz
samba-559575fe40c2d0d860868276c42efacb46dc59aa.zip
s4:dsdb/kcc/*.c - fix up wrong typed counters
-rw-r--r--source4/dsdb/kcc/kcc_connection.c6
-rw-r--r--source4/dsdb/kcc/kcc_deleted.c2
-rw-r--r--source4/dsdb/kcc/kcc_drs_replica_info.c20
-rw-r--r--source4/dsdb/kcc/kcc_periodic.c4
-rw-r--r--source4/dsdb/kcc/kcc_topology.c10
5 files changed, 22 insertions, 20 deletions
diff --git a/source4/dsdb/kcc/kcc_connection.c b/source4/dsdb/kcc/kcc_connection.c
index e78a6153445..e8f2e598364 100644
--- a/source4/dsdb/kcc/kcc_connection.c
+++ b/source4/dsdb/kcc/kcc_connection.c
@@ -129,7 +129,8 @@ void kccsrv_apply_connections(struct kccsrv_service *s,
struct kcc_connection_list *ntds_list,
struct kcc_connection_list *dsa_list)
{
- int i, j, deleted = 0, added = 0, ret;
+ unsigned int i, j, deleted = 0, added = 0;
+ int ret;
for (i = 0; ntds_list && i < ntds_list->count; i++) {
struct kcc_connection *ntds = &ntds_list->servers[i];
@@ -169,7 +170,8 @@ void kccsrv_apply_connections(struct kccsrv_service *s,
struct kcc_connection_list *kccsrv_find_connections(struct kccsrv_service *s,
TALLOC_CTX *mem_ctx)
{
- int ret, i;
+ unsigned int i;
+ int ret;
struct ldb_dn *base_dn;
struct ldb_result *res;
const char *attrs[] = { "objectGUID", "fromServer", NULL };
diff --git a/source4/dsdb/kcc/kcc_deleted.c b/source4/dsdb/kcc/kcc_deleted.c
index db473330212..dae9a8ef1bb 100644
--- a/source4/dsdb/kcc/kcc_deleted.c
+++ b/source4/dsdb/kcc/kcc_deleted.c
@@ -62,7 +62,7 @@ NTSTATUS kccsrv_check_deleted(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
struct ldb_dn *do_dn;
struct ldb_result *res;
const char *attrs[] = { "whenChanged", NULL };
- int i;
+ unsigned int i;
ret = dsdb_get_deleted_objects_dn(s->samdb, mem_ctx, part->dn, &do_dn);
if (ret != LDB_SUCCESS) {
diff --git a/source4/dsdb/kcc/kcc_drs_replica_info.c b/source4/dsdb/kcc/kcc_drs_replica_info.c
index 98defc888d1..c64753b7961 100644
--- a/source4/dsdb/kcc/kcc_drs_replica_info.c
+++ b/source4/dsdb/kcc/kcc_drs_replica_info.c
@@ -175,7 +175,7 @@ static WERROR kccdrs_replica_get_info_obj_metadata2(TALLOC_CTX *mem_ctx,
struct drsuapi_DsReplicaGetInfo *r,
union drsuapi_DsReplicaInfo *reply,
struct ldb_dn *dn,
- int base_index)
+ uint32_t base_index)
{
WERROR status;
struct replPropertyMetaDataBlob omd_ctr;
@@ -383,7 +383,7 @@ static WERROR get_master_ncs(TALLOC_CTX *mem_ctx, struct ldb_context *samdb,
struct ncList *nc_list = NULL;
struct ncList *nc_list_elem;
int ret;
- int i;
+ unsigned int i;
char *nc_str;
ret = ldb_search(samdb, mem_ctx, &res, ldb_get_config_basedn(samdb),
@@ -401,7 +401,7 @@ static WERROR get_master_ncs(TALLOC_CTX *mem_ctx, struct ldb_context *samdb,
for (i = 0; i < res->count; i++) {
struct ldb_message_element *msg_elem = ldb_msg_find_element(res->msgs[i], "hasMasterNCs");
- int k;
+ unsigned int k;
if (!msg_elem || msg_elem->num_values == 0) {
DEBUG(0,(__location__ ": Failed: Attribute hasMasterNCs not found - %s\n",
@@ -563,18 +563,18 @@ static WERROR kccdrs_replica_get_info_neighbours(TALLOC_CTX *mem_ctx,
struct ldb_context *samdb,
struct drsuapi_DsReplicaGetInfo *r,
union drsuapi_DsReplicaInfo *reply,
- int base_index,
+ uint32_t base_index,
struct GUID req_src_dsa_guid,
const char *object_dn_str)
{
WERROR status;
- int i, j;
+ uint32_t i, j;
struct ldb_dn *nc_dn = NULL;
struct ncList *p_nc_list = NULL;
struct repsFromToBlob *reps_from_blob = NULL;
struct repsFromTo2 *reps_from = NULL;
uint32_t c_reps_from;
- int i_rep;
+ uint32_t i_rep;
struct drsuapi_DsReplicaNeighbour neigh;
struct ncList *nc_list = NULL;
@@ -680,18 +680,18 @@ static WERROR kccdrs_replica_get_info_repsto(TALLOC_CTX *mem_ctx,
struct ldb_context *samdb,
struct drsuapi_DsReplicaGetInfo *r,
union drsuapi_DsReplicaInfo *reply,
- int base_index,
+ uint32_t base_index,
struct GUID req_src_dsa_guid,
const char *object_dn_str)
{
WERROR status;
- int i, j;
+ uint32_t i, j;
struct ncList *p_nc_list = NULL;
struct ldb_dn *nc_dn = NULL;
struct repsFromToBlob *reps_to_blob;
struct repsFromTo2 *reps_to;
uint32_t c_reps_to;
- int i_rep;
+ uint32_t i_rep;
struct drsuapi_DsReplicaNeighbour neigh;
struct ncList *nc_list = NULL;
@@ -754,7 +754,7 @@ NTSTATUS kccdrs_replica_get_info(struct irpc_message *msg,
WERROR status;
struct drsuapi_DsReplicaGetInfoRequest1 *req1;
struct drsuapi_DsReplicaGetInfoRequest2 *req2;
- int base_index;
+ uint32_t base_index;
union drsuapi_DsReplicaInfo *reply;
struct GUID req_src_dsa_guid;
const char *object_dn_str = NULL;
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index d27e922445a..14e15e8aea6 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -40,7 +40,7 @@
*/
static bool reps_in_list(struct repsFromToBlob *r, struct repsFromToBlob *reps, uint32_t count)
{
- unsigned int i;
+ uint32_t i;
for (i=0; i<count; i++) {
if (strcmp(r->ctr.ctr1.other_info->dns_name,
reps[i].ctr.ctr1.other_info->dns_name) == 0 &&
@@ -66,7 +66,7 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ct
struct repsFromToBlob *old_reps;
uint32_t old_count;
WERROR werr;
- unsigned int i;
+ uint32_t i;
bool modified = false;
werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsFrom", &old_reps, &old_count);
diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c
index a2dd4dd4b6c..3530d0e1deb 100644
--- a/source4/dsdb/kcc/kcc_topology.c
+++ b/source4/dsdb/kcc/kcc_topology.c
@@ -791,7 +791,7 @@ static NTSTATUS kcctpl_setup_graph(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
NULL };
int ret;
struct GUID_list vertex_ids;
- uint32_t i;
+ unsigned int i;
NTSTATUS status;
struct ldb_message *site;
uint64_t site_opts;
@@ -1075,7 +1075,7 @@ static NTSTATUS kcctpl_get_all_bridgehead_dcs(struct ldb_context *ldb,
struct ldb_message *site, *schema;
const char * const dc_attrs[] = { "objectGUID", "options", NULL };
struct ldb_message_element *el;
- uint32_t i;
+ unsigned int i;
bool rodc;
const char *transport_name, *transport_address_attr;
uint64_t site_opts;
@@ -1454,7 +1454,7 @@ static NTSTATUS kcctpl_color_vertices(struct ldb_context *ldb,
const char * const attrs[] = { "objectGUID", "name",
"transportAddressAttribute",
NULL };
- uint32_t j;
+ unsigned int j;
vertex = &graph->vertices.data[i];
@@ -2730,7 +2730,7 @@ static NTSTATUS kcctpl_create_connection(struct ldb_context *ldb,
const char * const attrs[] = { "objectGUID", "parent", "fromServer",
"transportType", "schedule", "options",
"enabledConnection", NULL };
- uint32_t i, valid_connections;
+ unsigned int i, valid_connections;
struct GUID_list keep_connections;
tmp_ctx = talloc_new(ldb);
@@ -3369,7 +3369,7 @@ static NTSTATUS kcctpl_create_intersite_connections(struct ldb_context *ldb,
const char * const attrs[] = { "enabled", "systemFlags", "nCName",
NULL };
int ret;
- uint32_t i;
+ unsigned int i;
all_connected = true;