mirror of
https://github.com/samba-team/samba.git
synced 2025-02-10 13:57:47 +03:00
s4:proxy LDB module - Change counter variables to "unsigned" where appropriate
Use "size_t" when counting string index positions.
This commit is contained in:
parent
90e236544f
commit
4ad912d2da
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user