summaryrefslogtreecommitdiffstats
path: root/source3/utils/regedit_dialog.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-11-13 09:12:56 +0100
committerJeremy Allison <jra@samba.org>2014-11-25 07:25:45 +0100
commit5d070d9f1844ebb120cf254c57f45c3aba9618ef (patch)
treed6ddc72fa291baa4bf37fc640ca4f37af0e26fef /source3/utils/regedit_dialog.c
parent002a1c57a962779372643abf0857e820541c1b0d (diff)
downloadsamba-5d070d9f1844ebb120cf254c57f45c3aba9618ef.tar.gz
samba-5d070d9f1844ebb120cf254c57f45c3aba9618ef.tar.xz
samba-5d070d9f1844ebb120cf254c57f45c3aba9618ef.zip
s3:utils: rename variables in regedit_*.c to fix shadow warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/utils/regedit_dialog.c')
-rw-r--r--source3/utils/regedit_dialog.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/regedit_dialog.c b/source3/utils/regedit_dialog.c
index d0b486feef..07fb1909c0 100644
--- a/source3/utils/regedit_dialog.c
+++ b/source3/utils/regedit_dialog.c
@@ -969,7 +969,7 @@ WERROR dialog_section_text_field_set_lines(TALLOC_CTX *ctx,
const char **array)
{
int rows, cols, max;
- size_t padding, length, index;
+ size_t padding, length, idx;
const char **arrayp;
char *buf = NULL;
struct dialog_section_text_field *text_field =
@@ -979,7 +979,7 @@ WERROR dialog_section_text_field_set_lines(TALLOC_CTX *ctx,
/* try to fit each string on it's own line. each line
needs to be padded with whitespace manually, since
ncurses fields do not have newlines. */
- for (index = 0, arrayp = array; *arrayp != NULL; ++arrayp) {
+ for (idx = 0, arrayp = array; *arrayp != NULL; ++arrayp) {
length = MIN(strlen(*arrayp), cols);
padding = cols - length;
buf = talloc_realloc(ctx, buf, char,
@@ -988,11 +988,11 @@ WERROR dialog_section_text_field_set_lines(TALLOC_CTX *ctx,
if (buf == NULL) {
return WERR_NOMEM;
}
- memcpy(&buf[index], *arrayp, length);
- index += length;
- memset(&buf[index], ' ', padding);
- index += padding;
- buf[index] = '\0';
+ memcpy(&buf[idx], *arrayp, length);
+ idx += length;
+ memset(&buf[idx], ' ', padding);
+ idx += padding;
+ buf[idx] = '\0';
}
set_field_buffer(text_field->field[0], 0, buf);