diff options
Diffstat (limited to 'source3/lib/smbconf/smbconf_init.c')
-rw-r--r-- | source3/lib/smbconf/smbconf_init.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/lib/smbconf/smbconf_init.c b/source3/lib/smbconf/smbconf_init.c index 36c51de5f0..2587a4fc53 100644 --- a/source3/lib/smbconf/smbconf_init.c +++ b/source3/lib/smbconf/smbconf_init.c @@ -34,28 +34,28 @@ * - "registry" or "reg" * - "txt" or "file" */ -WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, +sbcErr smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, const char *source) { - WERROR werr; + sbcErr err; char *backend = NULL; char *path = NULL; char *sep; TALLOC_CTX *tmp_ctx = talloc_stackframe(); if (conf_ctx == NULL) { - werr = WERR_INVALID_PARAM; + err = SBC_ERR_INVALID_PARAM; goto done; } if ((source == NULL) || (*source == '\0')) { - werr = WERR_INVALID_PARAM; + err = SBC_ERR_INVALID_PARAM; goto done; } backend = talloc_strdup(tmp_ctx, source); if (backend == NULL) { - werr = WERR_NOMEM; + err = SBC_ERR_NOMEM; goto done; } @@ -69,16 +69,16 @@ WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, } if (strequal(backend, "registry") || strequal(backend, "reg")) { - werr = smbconf_init_reg(mem_ctx, conf_ctx, path); + err = smbconf_init_reg(mem_ctx, conf_ctx, path); } else if (strequal(backend, "file") || strequal(backend, "txt")) { - werr = smbconf_init_txt(mem_ctx, conf_ctx, path); + err = smbconf_init_txt(mem_ctx, conf_ctx, path); } else if (sep == NULL) { /* * If no separator was given in the source, and the string is * not a known backend, assume file backend and use the source * string as a path argument. */ - werr = smbconf_init_txt(mem_ctx, conf_ctx, backend); + err = smbconf_init_txt(mem_ctx, conf_ctx, backend); } else { /* * Separator was specified but this is not a known backend. @@ -87,10 +87,10 @@ WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, * This may occur with an include directive like this: * 'include = /path/to/file.%T' */ - werr = smbconf_init_txt(mem_ctx, conf_ctx, source); + err = smbconf_init_txt(mem_ctx, conf_ctx, source); } done: talloc_free(tmp_ctx); - return werr; + return err; } |