summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tools/regtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/tools/regtree.c')
-rw-r--r--source4/lib/registry/tools/regtree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 9748ca3438..bc0055a891 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -32,10 +32,13 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals)
for(i = 0; i < l; i++) putchar(' ');
/* Hive name */
- if(p->hive->root == p) printf("%s\n", p->hive->name);
- else if(!p->name) printf("<No Name>\n");
- else if(fullpath) printf("%s\n", p->path);
- else printf("%s\n", p->name);
+ if(p->hive->root == p) {
+ if(p->hive->name) printf("%s\n", p->hive->name); else printf("<No Name>\n");
+ } else {
+ if(!p->name) printf("<No Name>\n");
+ if(fullpath) printf("%s\n", p->path);
+ else printf("%s\n", p->name);
+ }
mem_ctx = talloc_init("print_tree");
for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, p, i, &subkey)); i++) {