summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_query.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_query.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_query.c')
-rw-r--r--source4/dsdb/schema/schema_query.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c
index ff54488251..4ff84185f8 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -219,7 +219,7 @@ WERROR dsdb_linked_attribute_lDAPDisplayName_list(const struct dsdb_schema *sche
{
const char **attr_list = NULL;
struct dsdb_attribute *cur;
- int i = 0;
+ unsigned int i = 0;
for (cur = schema->attributes; cur; cur = cur->next) {
if (cur->linkID == 0) continue;
@@ -239,7 +239,7 @@ const char **merge_attr_list(TALLOC_CTX *mem_ctx,
const char **attrs, const char * const*new_attrs)
{
const char **ret_attrs;
- int i;
+ unsigned int i;
size_t new_len, orig_len = str_list_length(attrs);
if (!new_attrs) {
return attrs;
@@ -339,7 +339,7 @@ static const char **dsdb_full_attribute_list_internal(TALLOC_CTX *mem_ctx,
const char **class_list,
enum dsdb_attr_list_query query)
{
- int i;
+ unsigned int i;
const char **attr_list = NULL;
for (i=0; class_list && class_list[i]; i++) {
@@ -366,7 +366,7 @@ static const char **dsdb_full_attribute_list_internal_el(TALLOC_CTX *mem_ctx,
const struct ldb_message_element *el,
enum dsdb_attr_list_query query)
{
- int i;
+ unsigned int i;
const char **attr_list = NULL;
for (i=0; i < el->num_values; i++) {
@@ -391,10 +391,10 @@ static const char **dedup_attr_list(const char **attr_list)
size_t new_len = str_list_length(attr_list);
/* Remove duplicates */
if (new_len > 1) {
- int i;
+ size_t i;
TYPESAFE_QSORT(attr_list, new_len, qsort_string);
- for (i=1 ; i < new_len; i++) {
+ for (i=1; i < new_len; i++) {
const char **val1 = &attr_list[i-1];
const char **val2 = &attr_list[i];
if (ldb_attr_cmp(*val1, *val2) == 0) {