diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-11 13:50:53 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:21 +0200 |
commit | ff5838d97aad5b283073726052456b06ecf410b2 (patch) | |
tree | 17758bb35392865491bba9ad6a4fb8a4b69046dc /source3/lib/smbconf | |
parent | ddc28a683fcf036a279a0d3d7b23504364316fa6 (diff) | |
download | samba-ff5838d97aad5b283073726052456b06ecf410b2.tar.gz |
libsmbconf: Convert smbconf_get_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index f7faf51e7d0..42eb6d18b93 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -989,7 +989,7 @@ done: /** * get the value of a configuration parameter as a string */ -static WERROR smbconf_reg_get_parameter(struct smbconf_ctx *ctx, +static sbcErr smbconf_reg_get_parameter(struct smbconf_ctx *ctx, TALLOC_CTX *mem_ctx, const char *service, const char *param, @@ -1003,35 +1003,34 @@ static WERROR smbconf_reg_get_parameter(struct smbconf_ctx *ctx, err = smbconf_reg_open_service_key(mem_ctx, ctx, service, REG_KEY_READ, &key); if (!SBC_ERROR_IS_OK(err)) { - werr = WERR_NOMEM; goto done; } if (!smbconf_reg_valname_valid(param)) { - werr = WERR_INVALID_PARAM; + err = SBC_ERR_INVALID_PARAM; goto done; } if (!smbconf_value_exists(key, param)) { - werr = WERR_INVALID_PARAM; + err = SBC_ERR_INVALID_PARAM; goto done; } werr = reg_queryvalue(mem_ctx, key, param, &value); if (!W_ERROR_IS_OK(werr)) { + err = SBC_ERR_NOMEM; goto done; } *valstr = smbconf_format_registry_value(mem_ctx, value); - if (*valstr == NULL) { - werr = WERR_NOMEM; + err = SBC_ERR_NOMEM; } done: talloc_free(key); talloc_free(value); - return werr; + return err; } /** |