summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-29 14:53:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:02 -0500
commitdef0a74030714d07ed852178d9a8f2ec4ed16bab (patch)
treedca00df5df757f0ae64b1392658fd83f3b9dd7cb /source4/lib/registry/tools
parent9dc3f789c41cc63a784e087dc0f061e495e04bab (diff)
downloadsamba-def0a74030714d07ed852178d9a8f2ec4ed16bab.tar.gz
samba-def0a74030714d07ed852178d9a8f2ec4ed16bab.tar.bz2
samba-def0a74030714d07ed852178d9a8f2ec4ed16bab.zip
r3370: Initial work on Add Key/Delete Key/Add Value/Mod Value/Del Value support in
gregedit (This used to be commit 33f429c61f2859e3ad60fa38823174bbd331d91a)
Diffstat (limited to 'source4/lib/registry/tools')
-rw-r--r--source4/lib/registry/tools/regdiff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index 41a29e46d3..bedf3222d1 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -115,7 +115,7 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
const char *credentials1= NULL, *credentials2 = NULL;
char *outputfile = NULL;
FILE *fd = stdout;
- struct registry_context *h1, *h2;
+ struct registry_context *h1 = NULL, *h2;
int from_null = 0;
int i;
WERROR error, error2;
@@ -165,7 +165,7 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
fprintf(stderr, "Unable to open '%s' with backend '%s'\n", location1, backend1);
return 1;
}
- }
+ }
location2 = poptGetArg(pc);
if(!location2) {
@@ -196,8 +196,8 @@ static void writediff(struct registry_key *oldkey, struct registry_key *newkey,
error2 = error = WERR_OK;
- for(i = 0; i < h1->num_hives && i < h2->num_hives; i++) {
- writediff(h1->hives[i]->root, h2->hives[i]->root, fd);
+ for(i = 0; (!h1 || i < h1->num_hives) && i < h2->num_hives; i++) {
+ writediff(h1?h1->hives[i]->root:NULL, h2->hives[i]->root, fd);
}
fclose(fd);