diff options
author | Michael Adam <obnox@samba.org> | 2007-12-25 02:31:41 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2007-12-25 02:37:02 +0100 |
commit | 86486fcc9826663f7bf03fe4ceb354818415d089 (patch) | |
tree | c79e8f10f1a5f6c631e469d16c51c71e1cd86224 /source3/libnet/libnet_conf.c | |
parent | 9c20b9a731d581ae8bbf4f9ef66c3b7ded7e4122 (diff) | |
download | samba-86486fcc9826663f7bf03fe4ceb354818415d089.tar.gz samba-86486fcc9826663f7bf03fe4ceb354818415d089.tar.bz2 samba-86486fcc9826663f7bf03fe4ceb354818415d089.zip |
Simplify libnet_smbconf_delshare().
Remove talloc context parameter.
Remove d_printf error message.
Michael
(This used to be commit 870d35c04889603843bae989fb9c01396b4c6ed1)
Diffstat (limited to 'source3/libnet/libnet_conf.c')
-rw-r--r-- | source3/libnet/libnet_conf.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index ad02930ce4..4c5a0829d6 100644 --- a/source3/libnet/libnet_conf.c +++ b/source3/libnet/libnet_conf.c @@ -246,24 +246,21 @@ done: /** * delete a service from configuration */ -WERROR libnet_smbconf_delshare(TALLOC_CTX *ctx, const char *keyname) +WERROR libnet_smbconf_delshare(const char *servicename) { WERROR werr = WERR_OK; struct registry_key *key = NULL; + TALLOC_CTX *ctx = talloc_stackframe(); werr = libnet_smbconf_open_basepath(ctx, REG_KEY_WRITE, &key); if (!W_ERROR_IS_OK(werr)) { goto done; } - werr = reg_deletekey_recursive(key, key, keyname); - if (!W_ERROR_IS_OK(werr)) { - d_fprintf(stderr, "Error deleting registry key %s\\%s: %s\n", - KEY_SMBCONF, keyname, dos_errstr(werr)); - } + werr = reg_deletekey_recursive(key, key, servicename); done: - TALLOC_FREE(key); + TALLOC_FREE(ctx); return werr; } |