summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-06 20:14:41 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-07 19:01:15 +0100
commit5a54b204c3d2b6c9282cdd459a3d1030fde48926 (patch)
tree64b4f4ac60c78eb7fe348d314392490d9d434fd4 /source4/dsdb/schema/schema_init.c
parentbd5f08f3d10d12a34a9b3f40594d36f0d6d37eb9 (diff)
downloadsamba-5a54b204c3d2b6c9282cdd459a3d1030fde48926.tar.gz
samba-5a54b204c3d2b6c9282cdd459a3d1030fde48926.tar.bz2
samba-5a54b204c3d2b6c9282cdd459a3d1030fde48926.zip
s4:schema - Change also here counters to "unsigned" where needed
Counters which are used in the way "for (i = 0; array[i] != NULL; i++)" I modified to "unsigned" since for sure we don't want to have negative array indexes there.
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index c369d57fa9..949c1ea069 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -379,7 +379,7 @@ WERROR dsdb_read_prefixes_from_ldb(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
static bool dsdb_schema_unique_attribute(const char *attr)
{
const char *attrs[] = { "objectGUID", "objectSID" , NULL };
- int i;
+ unsigned int i;
for (i=0;attrs[i];i++) {
if (strcasecmp(attr, attrs[i]) == 0) {
return true;
@@ -713,7 +713,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
char **error_string)
{
WERROR status;
- uint32_t i;
+ unsigned int i;
const struct ldb_val *prefix_val;
const struct ldb_val *info_val;
struct ldb_val info_val_default;
@@ -845,7 +845,8 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
uint32_t *idx)
{
WERROR status;
- uint32_t i, attid;
+ unsigned int i;
+ uint32_t attid;
const char *oid = NULL;
for(i=0; i < ARRAY_SIZE(name_mappings); i++) {
@@ -904,7 +905,7 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
} while (0)
#define GET_UINT32_LIST_DS(s, r, attr, mem_ctx, p, elem) do { \
- int list_counter; \
+ unsigned int list_counter; \
struct drsuapi_DsReplicaAttribute *_a; \
_a = dsdb_find_object_attr_name(s, r, attr, NULL); \
(p)->elem = _a ? talloc_array(mem_ctx, uint32_t, _a->value_ctr.num_values + 1) : NULL; \