From 4e16a285c7c34732ba95fb5ec201e6f11cf88bef Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 6 Nov 2009 18:35:17 +0100 Subject: LDB:common - Change counters to "unsigned" where appropriate To count LDB objects use variables of type "unsigned (int)" or "long long int" on binary or downto searches. To count characters in strings use "size_t". To calculate differences between pointers use "ptrdiff_t". --- source4/lib/ldb/common/attrib_handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb/common/attrib_handlers.c') diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c index 464707530e..2a2bd0852e 100644 --- a/source4/lib/ldb/common/attrib_handlers.c +++ b/source4/lib/ldb/common/attrib_handlers.c @@ -55,7 +55,7 @@ int ldb_handler_fold(struct ldb_context *ldb, void *mem_ctx, const struct ldb_val *in, struct ldb_val *out) { char *s, *t; - int l; + size_t l; if (!in || !out || !(in->data)) { return -1; @@ -456,7 +456,7 @@ static const struct ldb_schema_syntax ldb_standard_syntaxes[] = { const struct ldb_schema_syntax *ldb_standard_syntax_by_name(struct ldb_context *ldb, const char *syntax) { - int i; + unsigned int i; unsigned num_handlers = sizeof(ldb_standard_syntaxes)/sizeof(ldb_standard_syntaxes[0]); /* TODO: should be replaced with a binary search */ for (i=0;i