diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-04-12 18:46:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:15 -0500 |
commit | b4d6cbd380b09d0638102137b589555cb4e1c285 (patch) | |
tree | 54d909e933a0d3e92524261a8b08b3fad39b3d3a /source4/lib/registry/tools/regshell.c | |
parent | 4019324f7633c029c3cf461ed8d15433fc7609ea (diff) | |
download | samba-b4d6cbd380b09d0638102137b589555cb4e1c285.tar.gz samba-b4d6cbd380b09d0638102137b589555cb4e1c285.tar.bz2 samba-b4d6cbd380b09d0638102137b589555cb4e1c285.zip |
r183: More bugfixes
(This used to be commit 88911bbcca574adbf6ea4f0759a68f2961b05d6b)
Diffstat (limited to 'source4/lib/registry/tools/regshell.c')
-rw-r--r-- | source4/lib/registry/tools/regshell.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index d60ca1ff46..18399b5bda 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -39,18 +39,17 @@ static REG_KEY *cmd_set(REG_KEY *cur, int argc, char **argv) static REG_KEY *cmd_ck(REG_KEY *cur, int argc, char **argv) { - REG_KEY *new; + REG_KEY *new = NULL; WERROR error; if(argc < 2) { new = cur; } else { error = reg_open_key(cur, argv[1], &new); if(!W_ERROR_IS_OK(error)) { - DEBUG(0, ("Error opening specified key\n")); + DEBUG(0, ("Error opening specified key: %s\n", win_errstr(error))); + return NULL; } - } - - if(!new) new = cur; + } printf("Current path is: %s\n", reg_key_get_path(new)); |