summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-07 19:13:11 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-07 19:19:26 +0100
commit4ad912d2daed57b08f75b59638aa940109d8f167 (patch)
treed2699d0b587c5256c205cbbdc9a0d74a9498c8c5
parent90e236544f60c847e3fc7e3c183f9759850d3575 (diff)
downloadsamba-4ad912d2daed57b08f75b59638aa940109d8f167.tar.gz
samba-4ad912d2daed57b08f75b59638aa940109d8f167.tar.bz2
samba-4ad912d2daed57b08f75b59638aa940109d8f167.zip
s4:proxy LDB module - Change counter variables to "unsigned" where appropriate
Use "size_t" when counting string index positions.
-rw-r--r--source4/dsdb/samdb/ldb_modules/proxy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index 87b1a6e1b6..616563e2d0 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -165,7 +165,7 @@ failed:
static void proxy_convert_blob(TALLOC_CTX *mem_ctx, struct ldb_val *v,
const char *oldstr, const char *newstr)
{
- int len1, len2, len3;
+ size_t len1, len2, len3;
uint8_t *olddata = v->data;
char *p = strcasestr((char *)v->data, oldstr);
@@ -184,7 +184,7 @@ static void proxy_convert_blob(TALLOC_CTX *mem_ctx, struct ldb_val *v,
*/
static void proxy_convert_value(struct proxy_data *proxy, struct ldb_message *msg, struct ldb_val *v)
{
- int i;
+ size_t i;
for (i=0;proxy->oldstr[i];i++) {
char *p = strcasestr((char *)v->data, proxy->oldstr[i]);
@@ -201,7 +201,7 @@ static struct ldb_parse_tree *proxy_convert_tree(TALLOC_CTX *mem_ctx,
struct proxy_data *proxy,
struct ldb_parse_tree *tree)
{
- int i;
+ size_t i;
char *expression = ldb_filter_from_tree(mem_ctx, tree);
for (i=0;proxy->newstr[i];i++) {
@@ -225,7 +225,7 @@ static void proxy_convert_record(struct ldb_context *ldb,
struct proxy_data *proxy,
struct ldb_message *msg)
{
- int attr, v;
+ unsigned int attr, v;
/* fix the message DN */
if (ldb_dn_compare_base(proxy->olddn, msg->dn) == 0) {
@@ -307,7 +307,8 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
struct proxy_data *proxy = talloc_get_type(ldb_module_get_private(module), struct proxy_data);
struct ldb_request *newreq;
struct ldb_dn *base;
- int ret, i;
+ unsigned int i;
+ int ret;
ldb = ldb_module_get_ctx(module);