werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/rpcclient/
authorGünther Deschner <gd@samba.org>
Thu, 3 Dec 2015 14:24:16 +0000 (15:24 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 27 Sep 2016 22:04:19 +0000 (00:04 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpcclient/cmd_netlogon.c
source3/rpcclient/cmd_ntsvcs.c
source3/rpcclient/cmd_spoolss.c
source3/rpcclient/cmd_winreg.c
source3/rpcclient/cmd_wkssvc.c

index 744361c4a478beab96d5673f0fee6fed9b2f0ae9..e7a66dea028f5959ce1972fa7f8898f2b6770f15 100644 (file)
@@ -232,13 +232,13 @@ static WERROR cmd_netlogon_dsr_getdcname(struct rpc_pipe_client *cli,
 
        if (argc >= 3) {
                if (!NT_STATUS_IS_OK(GUID_from_string(argv[2], &domain_guid))) {
-                       return WERR_NOMEM;
+                       return WERR_NOT_ENOUGH_MEMORY;
                }
        }
 
        if (argc >= 4) {
                if (!NT_STATUS_IS_OK(GUID_from_string(argv[3], &site_guid))) {
-                       return WERR_NOMEM;
+                       return WERR_NOT_ENOUGH_MEMORY;
                }
        }
 
@@ -293,7 +293,7 @@ static WERROR cmd_netlogon_dsr_getdcnameex(struct rpc_pipe_client *cli,
 
        if (argc >= 3) {
                if (!NT_STATUS_IS_OK(GUID_from_string(argv[2], &domain_guid))) {
-                       return WERR_NOMEM;
+                       return WERR_NOT_ENOUGH_MEMORY;
                }
        }
 
@@ -364,7 +364,7 @@ static WERROR cmd_netlogon_dsr_getdcnameex2(struct rpc_pipe_client *cli,
 
        if (argc >= 5) {
                if (!NT_STATUS_IS_OK(GUID_from_string(argv[4], &domain_guid))) {
-                       return WERR_NOMEM;
+                       return WERR_NOT_ENOUGH_MEMORY;
                }
        }
 
index faccbc8cf1b11c028a474531a2b230fa20a42b8e..21714ebbbbec8535080c466189c03f28e614bf95 100644 (file)
@@ -262,7 +262,7 @@ static WERROR cmd_ntsvcs_get_dev_list(struct rpc_pipe_client *cli,
 
        buffer = talloc(mem_ctx, uint16_t);
        if (!buffer) {
-               return WERR_NOMEM;
+               return WERR_NOT_ENOUGH_MEMORY;
        }
 
        status = dcerpc_PNP_GetDeviceList(b, mem_ctx,
index 91f328ec3e5fb9ae97b67ac72ad250b2c78134ae..f6bf2da7b4c976ad3229033224df1899e925fb5f 100644 (file)
@@ -2725,13 +2725,13 @@ static WERROR cmd_spoolss_setprinterdata(struct rpc_pipe_client *cli,
                        if (!add_string_to_array(mem_ctx, argv[i],
                                                 &strings,
                                                 &num_strings)) {
-                               result = WERR_NOMEM;
+                               result = WERR_NOT_ENOUGH_MEMORY;
                                goto done;
                        }
                }
                data.string_array = talloc_zero_array(mem_ctx, const char *, num_strings + 1);
                if (!data.string_array) {
-                       result = WERR_NOMEM;
+                       result = WERR_NOT_ENOUGH_MEMORY;
                        goto done;
                }
                for (i=0; i < num_strings; i++) {
@@ -3330,7 +3330,7 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
 
        option.types = talloc_array(mem_ctx, struct spoolss_NotifyOptionType, 2);
        if (option.types == NULL) {
-               result = WERR_NOMEM;
+               result = WERR_NOT_ENOUGH_MEMORY;
                goto done;
        }
 
@@ -3338,7 +3338,7 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
        option.types[0].count = 1;
        option.types[0].fields = talloc_array(mem_ctx, union spoolss_Field, 1);
        if (option.types[0].fields == NULL) {
-               result = WERR_NOMEM;
+               result = WERR_NOT_ENOUGH_MEMORY;
                goto done;
        }
        option.types[0].fields[0].field = PRINTER_NOTIFY_FIELD_SERVER_NAME;
@@ -3347,14 +3347,14 @@ static WERROR cmd_spoolss_rffpcnex(struct rpc_pipe_client *cli,
        option.types[1].count = 1;
        option.types[1].fields = talloc_array(mem_ctx, union spoolss_Field, 1);
        if (option.types[1].fields == NULL) {
-               result = WERR_NOMEM;
+               result = WERR_NOT_ENOUGH_MEMORY;
                goto done;
        }
        option.types[1].fields[0].field = JOB_NOTIFY_FIELD_PRINTER_NAME;
 
        clientname = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name());
        if (!clientname) {
-               result = WERR_NOMEM;
+               result = WERR_NOT_ENOUGH_MEMORY;
                goto done;
        }
 
index fba033239fe69d075ac91e9dc6208affa0522e66..7931d85d244a635a9d55e5c5c44fb123eceb4f5a 100644 (file)
@@ -202,19 +202,19 @@ static WERROR cmd_winreg_querymultiplevalues_ex(struct rpc_pipe_client *cli,
 
        values_in = talloc_zero_array(mem_ctx, struct QueryMultipleValue, num_values);
        if (values_in == NULL) {
-               return WERR_NOMEM;
+               return WERR_NOT_ENOUGH_MEMORY;
        }
 
        values_out = talloc_zero_array(mem_ctx, struct QueryMultipleValue, num_values);
        if (values_out == NULL) {
-               return WERR_NOMEM;
+               return WERR_NOT_ENOUGH_MEMORY;
        }
 
        for (i=0; i < num_values; i++) {
 
                values_in[i].ve_valuename = talloc_zero(values_in, struct winreg_ValNameBuf);
                if (values_in[i].ve_valuename == NULL) {
-                       return WERR_NOMEM;
+                       return WERR_NOT_ENOUGH_MEMORY;
                }
 
                values_in[i].ve_valuename->name = talloc_strdup(values_in[i].ve_valuename, argv[i+2]);
@@ -243,7 +243,7 @@ static WERROR cmd_winreg_querymultiplevalues_ex(struct rpc_pipe_client *cli,
 
                        buffer = talloc_zero_array(mem_ctx, uint8_t, needed);
                        if (buffer == NULL) {
-                               return WERR_NOMEM;
+                               return WERR_NOT_ENOUGH_MEMORY;
                        }
 
                        status = dcerpc_winreg_QueryMultipleValues2(b, mem_ctx,
@@ -269,7 +269,7 @@ static WERROR cmd_winreg_querymultiplevalues_ex(struct rpc_pipe_client *cli,
 
                buffer = talloc_zero_array(mem_ctx, uint8_t, buffer_size);
                if (buffer == NULL) {
-                       return WERR_NOMEM;
+                       return WERR_NOT_ENOUGH_MEMORY;
                }
 
                status = dcerpc_winreg_QueryMultipleValues(b, mem_ctx,
index 7ebc0aaa1b031b1e8674ff0e97ca084444048d5e..f9026255b3cf953b0f00bfba8cb289ba0c18b408 100644 (file)
@@ -110,7 +110,7 @@ static WERROR cmd_wkssvc_messagebuffersend(struct rpc_pipe_client *cli,
        if (!push_ucs2_talloc(mem_ctx, &message_buffer, message,
                              &message_size))
        {
-               return WERR_NOMEM;
+               return WERR_NOT_ENOUGH_MEMORY;
        }
 
        status = dcerpc_wkssvc_NetrMessageBufferSend(b, mem_ctx,