summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_modules.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-06 18:35:17 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-08 12:52:24 +0100
commit4e16a285c7c34732ba95fb5ec201e6f11cf88bef (patch)
tree9fcc4fc18c0c6a36728a511eacd34535bbec8178 /source4/lib/ldb/common/ldb_modules.c
parent30ff229a3e32549073424b423302e976c988d563 (diff)
downloadsamba-4e16a285c7c34732ba95fb5ec201e6f11cf88bef.tar.gz
samba-4e16a285c7c34732ba95fb5ec201e6f11cf88bef.tar.bz2
samba-4e16a285c7c34732ba95fb5ec201e6f11cf88bef.zip
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".
Diffstat (limited to 'source4/lib/ldb/common/ldb_modules.c')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 4cf5dc87d1..ce6031f600 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -48,7 +48,7 @@ void ldb_set_modules_dir(struct ldb_context *ldb, const char *path)
static char *ldb_modules_strdup_no_spaces(TALLOC_CTX *mem_ctx, const char *string)
{
- int i, len;
+ size_t i, len;
char *trimmed;
trimmed = talloc_strdup(mem_ctx, string);
@@ -79,7 +79,7 @@ const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *m
char **modules = NULL;
const char **m;
char *modstr, *p;
- int i;
+ unsigned int i;
/* spaces not admitted */
modstr = ldb_modules_strdup_no_spaces(mem_ctx, string);
@@ -144,7 +144,7 @@ static const struct ldb_builtins {
static ldb_connect_fn ldb_find_backend(const char *url)
{
struct backends_list_entry *backend;
- int i;
+ unsigned int i;
for (i = 0; builtins[i].backend_ops || builtins[i].module_ops; i++) {
if (builtins[i].backend_ops == NULL) continue;
@@ -262,7 +262,7 @@ int ldb_connect_backend(struct ldb_context *ldb,
static const struct ldb_module_ops *ldb_find_module_ops(const char *name)
{
struct ops_list_entry *e;
- int i;
+ unsigned int i;
for (i = 0; builtins[i].backend_ops || builtins[i].module_ops; i++) {
if (builtins[i].module_ops == NULL) continue;
@@ -333,7 +333,7 @@ static void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out)
{
struct ldb_module *module;
- int i;
+ unsigned int i;
module = backend;
@@ -399,7 +399,7 @@ int ldb_init_module_chain(struct ldb_context *ldb, struct ldb_module *module)
int ldb_load_modules(struct ldb_context *ldb, const char *options[])
{
const char **modules = NULL;
- int i;
+ unsigned int i;
int ret;
TALLOC_CTX *mem_ctx = talloc_new(ldb);
if (!mem_ctx) {