From 89ab6818e170b305a70b7258ac11e11a2eb53aeb Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 7 Nov 2009 21:07:20 +0100 Subject: s4:libregistry - change counters to be "unsigned" Also the s4 registry library has to have "unsigned" counters like the Windows one. --- source4/lib/registry/tools/regshell.c | 14 +++++++------- source4/lib/registry/tools/regtree.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/lib/registry/tools') diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index 2bacaac6bc..003cbd15e0 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -266,7 +266,7 @@ static WERROR cmd_print(struct regshell_context *ctx, int argc, char **argv) static WERROR cmd_ls(struct regshell_context *ctx, int argc, char **argv) { - int i; + unsigned int i; WERROR error; uint32_t valuetype; DATA_BLOB valuedata; @@ -388,7 +388,7 @@ static struct { static WERROR cmd_help(struct regshell_context *ctx, int argc, char **argv) { - int i; + unsigned int i; printf("Available commands:\n"); for(i = 0; regshell_cmds[i].name; i++) { printf("%s - %s\n", regshell_cmds[i].name, @@ -429,7 +429,8 @@ static char **reg_complete_command(const char *text, int start, int end) { /* Complete command */ char **matches; - int i, len, samelen=0, count=1; + size_t len, samelen=0; + unsigned int i, count=1; matches = malloc_array_p(char *, MAX_COMPLETIONS); if (!matches) return NULL; @@ -477,9 +478,8 @@ static char **reg_complete_key(const char *text, int start, int end) { struct registry_key *base; const char *subkeyname; - int i, j = 1; - int samelen = 0; - int len; + unsigned int i, j = 1; + size_t len, samelen = 0; char **matches; const char *base_n = ""; TALLOC_CTX *mem_ctx; @@ -593,7 +593,7 @@ int main(int argc, char **argv) return 1; if (ctx->current == NULL) { - int i; + unsigned int i; for (i = 0; (reg_predefined_keys[i].handle != 0) && (ctx->current == NULL); i++) { diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c index d266b604e3..72158283b3 100644 --- a/source4/lib/registry/tools/regtree.c +++ b/source4/lib/registry/tools/regtree.c @@ -43,7 +43,7 @@ static void print_tree(int level, struct registry_key *p, DATA_BLOB valuedata; struct security_descriptor *sec_desc; WERROR error; - int i; + unsigned int i; TALLOC_CTX *mem_ctx; for(i = 0; i < level; i++) putchar(' '); puts(name); -- cgit