diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-12-16 17:10:32 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-12-17 10:05:24 +0100 |
commit | b1c0ad085fbfd9d2e29de15b131d2ff642b15708 (patch) | |
tree | 600522cbda60f6d3791e456db4ee2e0240228493 /src/ldb_modules | |
parent | 2bc09619e5c8f8c02bcd169ade1878ef28aedb4c (diff) | |
download | sssd-b1c0ad085fbfd9d2e29de15b131d2ff642b15708.tar.gz sssd-b1c0ad085fbfd9d2e29de15b131d2ff642b15708.tar.bz2 sssd-b1c0ad085fbfd9d2e29de15b131d2ff642b15708.zip |
MEMBEROF: silence compilation warnings
src/ldb_modules/memberof.c: In function ‘mbof_get_ghost_from_parent_cb’:
src/ldb_modules/memberof.c:3085: warning: declaration of ‘dup’ shadows a global declaration
/usr/include/unistd.h:528: warning: shadowed declaration is here
src/ldb_modules/memberof.c: In function ‘mbof_inherited_mod’:
src/ldb_modules/memberof.c:3253: warning: declaration of ‘dup’ shadows a global declaration
/usr/include/unistd.h:528: warning: shadowed declaration is here
src/ldb_modules/memberof.c: In function ‘mbof_fill_vals_array’:
src/ldb_modules/memberof.c:3786: warning: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:489: warning: shadowed declaration is here
Diffstat (limited to 'src/ldb_modules')
-rw-r--r-- | src/ldb_modules/memberof.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c index 9f67d865..0f947fb0 100644 --- a/src/ldb_modules/memberof.c +++ b/src/ldb_modules/memberof.c @@ -3078,7 +3078,7 @@ static int mbof_get_ghost_from_parent_cb(struct ldb_request *req, struct mbof_mod_del_op *igh; struct mbof_ctx *ctx; struct ldb_message_element *el; - struct ldb_val *dup; + struct ldb_val *dupval; int ret; hash_value_t value; hash_key_t key; @@ -3114,18 +3114,18 @@ static int mbof_get_ghost_from_parent_cb(struct ldb_request *req, continue; } - dup = talloc_zero(igh->inherited_gh, struct ldb_val); - if (dup == NULL) { + dupval = talloc_zero(igh->inherited_gh, struct ldb_val); + if (dupval == NULL) { return LDB_ERR_OPERATIONS_ERROR; } - *dup = ldb_val_dup(igh->inherited_gh, &el->values[i]); - if (dup->data == NULL) { + *dupval = ldb_val_dup(igh->inherited_gh, &el->values[i]); + if (dupval->data == NULL) { return LDB_ERR_OPERATIONS_ERROR; } value.type = HASH_VALUE_PTR; - value.ptr = dup; + value.ptr = dupval; ret = hash_enter(igh->inherited_gh, &key, &value); if (ret != HASH_SUCCESS) { @@ -3246,7 +3246,7 @@ static int mbof_inherited_mod(struct mbof_mod_ctx *mod_ctx) struct ldb_message_element *el; struct ldb_message *msg; struct ldb_val *val; - struct ldb_val *dup; + struct ldb_val *dupval; hash_value_t *values; unsigned long num_values; int i, j; @@ -3281,8 +3281,8 @@ static int mbof_inherited_mod(struct mbof_mod_ctx *mod_ctx) for (i = 0, j = 0; i < num_values; i++) { val = talloc_get_type(values[i].ptr, struct ldb_val); - dup = ldb_msg_find_val(mod_ctx->ghel, val); - if (dup) { + dupval = ldb_msg_find_val(mod_ctx->ghel, val); + if (dupval) { continue; } @@ -3779,7 +3779,7 @@ static int mbof_fill_vals_array(TALLOC_CTX *memctx, struct mbof_val_array **val_array) { struct mbof_val_array *var = *val_array; - int i, index; + int i, vi; if (var == NULL) { var = talloc_zero(memctx, struct mbof_val_array); @@ -3795,7 +3795,7 @@ static int mbof_fill_vals_array(TALLOC_CTX *memctx, /* We do not care about duplicate values now. * They will be filtered later */ - index = var->num; + vi = var->num; var->num += num_values; var->vals = talloc_realloc(memctx, var->vals, struct ldb_val, var->num); if (!var->vals) { @@ -3804,13 +3804,13 @@ static int mbof_fill_vals_array(TALLOC_CTX *memctx, /* FIXME - use ldb_val_dup() */ for (i = 0; i < num_values; i++) { - var->vals[index].length = strlen((const char *) values[i].data); - var->vals[index].data = (uint8_t *) talloc_strdup(var, + var->vals[vi].length = strlen((const char *) values[i].data); + var->vals[vi].data = (uint8_t *) talloc_strdup(var, (const char *) values[i].data); - if (var->vals[index].data == NULL) { + if (var->vals[vi].data == NULL) { return LDB_ERR_OPERATIONS_ERROR; } - index++; + vi++; } return LDB_SUCCESS; |