diff options
author | Günther Deschner <gd@samba.org> | 2015-12-03 15:24:17 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-09-28 00:04:19 +0200 |
commit | 9c164efe2a0449d21e0fdfabd2299d0d18e753eb (patch) | |
tree | 56c70a147d3f8664b3117186b4269e5d982f227b | |
parent | fdc89feb8fe8da29a4355a43873e5a547e667962 (diff) | |
download | samba-9c164efe2a0449d21e0fdfabd2299d0d18e753eb.tar.gz |
werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/utils/
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/utils/net_ads.c | 2 | ||||
-rw-r--r-- | source3/utils/net_registry.c | 2 | ||||
-rw-r--r-- | source3/utils/net_registry_util.c | 4 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 4 | ||||
-rw-r--r-- | source3/utils/net_rpc_conf.c | 28 | ||||
-rw-r--r-- | source3/utils/net_rpc_registry.c | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index e6b9fdc4185..8e523e32d70 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1485,7 +1485,7 @@ int net_ads_join(struct net_context *c, int argc, const char **argv) if (!(ctx = talloc_init("net_ads_join"))) { d_fprintf(stderr, _("Could not initialise talloc context.\n")); - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; goto fail; } diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 3fa22edd8ea..5f5829de3b6 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -69,7 +69,7 @@ static WERROR open_hive(TALLOC_CTX *ctx, const char *path, } *subkeyname = talloc_strdup(ctx, tmp_subkeyname); if (*subkeyname == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; goto done; } diff --git a/source3/utils/net_registry_util.c b/source3/utils/net_registry_util.c index 3552a6a58ca..77ed395c23a 100644 --- a/source3/utils/net_registry_util.c +++ b/source3/utils/net_registry_util.c @@ -149,7 +149,7 @@ WERROR split_hive_key(TALLOC_CTX *ctx, const char *path, char **hivename, } if (*hivename == NULL) { - return WERR_NOMEM; + return WERR_NOT_ENOUGH_MEMORY; } /* strip trailing '\\' chars */ @@ -170,7 +170,7 @@ WERROR split_hive_key(TALLOC_CTX *ctx, const char *path, char **hivename, } *subkeyname = talloc_strdup(ctx, tmp_subkeyname); if (*subkeyname == NULL) { - return WERR_NOMEM; + return WERR_NOT_ENOUGH_MEMORY; } return WERR_OK; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 1e3e2866ae4..68f541bbdfe 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -383,7 +383,7 @@ static int net_rpc_oldjoin(struct net_context *c, int argc, const char **argv) pw = talloc_strndup(r, lp_netbios_name(), 14); if (pw == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; goto fail; } @@ -394,7 +394,7 @@ static int net_rpc_oldjoin(struct net_context *c, int argc, const char **argv) r->in.admin_account = ""; r->in.admin_password = strlower_talloc(r, pw); if (r->in.admin_password == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; goto fail; } r->in.debug = true; diff --git a/source3/utils/net_rpc_conf.c b/source3/utils/net_rpc_conf.c index 6fb07cad9a2..d60d5e1e8a5 100644 --- a/source3/utils/net_rpc_conf.c +++ b/source3/utils/net_rpc_conf.c @@ -342,7 +342,7 @@ static NTSTATUS rpc_conf_set_share(TALLOC_CTX *mem_ctx, const char *, service->num_params + 1); if (includes == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, "ERROR: out of memory\n"); goto error; } @@ -354,7 +354,7 @@ static NTSTATUS rpc_conf_set_share(TALLOC_CTX *mem_ctx, service->param_values[j]); if (includes[j-i] == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, "ERROR: out of memory\n"); goto error; } @@ -470,7 +470,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, &data[i], &multi_s)) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to enumerate values: %s\n"), win_errstr(result)); @@ -489,7 +489,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, /* place the name of the share in the smbconf_service struct */ tmp_share.name = talloc_strdup(frame, share_name); if (tmp_share.name == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; @@ -502,14 +502,14 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, /* allocate memory for the param_names and param_values lists */ tmp_share.param_names = talloc_zero_array(frame, char *, tmp_share.num_params); if (tmp_share.param_names == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; } tmp_share.param_values = talloc_zero_array(frame, char *, tmp_share.num_params); if (tmp_share.param_values == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; @@ -518,7 +518,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, for (i = 0; i < num_vals; i++) { if (strcmp(val_names[i], "includes") != 0) { if (!pull_reg_sz(frame, &data[i], &s)) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to enumerate values: %s\n"), win_errstr(result)); @@ -527,7 +527,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, /* place param_names */ tmp_share.param_names[param_cnt] = talloc_strdup(frame, val_names[i]); if (tmp_share.param_names[param_cnt] == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; @@ -536,7 +536,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, /* place param_values */ tmp_share.param_values[param_cnt++] = talloc_strdup(frame, s); if (tmp_share.param_values[param_cnt - 1] == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; @@ -547,7 +547,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, for (i = 0; i < includes_cnt; i++) { tmp_share.param_names[param_cnt] = talloc_strdup(frame, "include"); if (tmp_share.param_names[param_cnt] == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; @@ -555,7 +555,7 @@ static NTSTATUS rpc_conf_get_share(TALLOC_CTX *mem_ctx, tmp_share.param_values[param_cnt++] = talloc_strdup(frame, multi_s[i]); if (tmp_share.param_values[param_cnt - 1] == NULL) { - result = WERR_NOMEM; + result = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(result)); goto error; @@ -958,7 +958,7 @@ static NTSTATUS rpc_conf_list_internal(struct net_context *c, /* get info from each subkey */ shares = talloc_zero_array(frame, struct smbconf_service, num_subkeys); if (shares == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create shares: %s\n"), win_errstr(werr)); goto error; @@ -1335,7 +1335,7 @@ static NTSTATUS rpc_conf_showshare_internal(struct net_context *c, sharename = talloc_strdup(frame, argv[0]); if (sharename == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(werr)); goto error; @@ -1343,7 +1343,7 @@ static NTSTATUS rpc_conf_showshare_internal(struct net_context *c, service = talloc(frame, struct smbconf_service); if (service == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; d_fprintf(stderr, _("Failed to create share: %s\n"), win_errstr(werr)); goto error; diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 2a230774d61..34531a66935 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -1723,7 +1723,7 @@ static WERROR import_create_key(struct import_ctx* ctx, key = talloc_zero(mem_ctx, struct policy_handle); if (key == NULL) { - werr = WERR_NOMEM; + werr = WERR_NOT_ENOUGH_MEMORY; goto done; } |