summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-11 01:47:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:02 -0500
commit5f86d006debd880ec35db4ebe7db0663c5cb220f (patch)
treeb7ad301d3cf0c586e9ce38cd004d84115063889f /source
parent82ce272b2464f06e8bcbed6452621daa05e12b5d (diff)
downloadsamba-5f86d006debd880ec35db4ebe7db0663c5cb220f.tar.gz
samba-5f86d006debd880ec35db4ebe7db0663c5cb220f.tar.xz
samba-5f86d006debd880ec35db4ebe7db0663c5cb220f.zip
r20674: Regenerate NDR parsers after pidl changes. This should fix a couple of
coverity warnings.
Diffstat (limited to 'source')
-rw-r--r--source/librpc/gen_ndr/ndr_echo.c4
-rw-r--r--source/librpc/gen_ndr/ndr_initshutdown.c8
-rw-r--r--source/librpc/gen_ndr/ndr_lsa.c36
-rw-r--r--source/librpc/gen_ndr/ndr_netlogon.c44
-rw-r--r--source/librpc/gen_ndr/ndr_srvsvc.c32
-rw-r--r--source/librpc/gen_ndr/ndr_unixinfo.c2
-rw-r--r--source/librpc/gen_ndr/ndr_winreg.c44
-rw-r--r--source/librpc/gen_ndr/ndr_wkssvc.c4
8 files changed, 66 insertions, 108 deletions
diff --git a/source/librpc/gen_ndr/ndr_echo.c b/source/librpc/gen_ndr/ndr_echo.c
index fc9fe19e56e..60199db7d0b 100644
--- a/source/librpc/gen_ndr/ndr_echo.c
+++ b/source/librpc/gen_ndr/ndr_echo.c
@@ -1064,7 +1064,6 @@ NTSTATUS ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct ec
if (r->in.foo2 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
if (r->in.foo3 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.foo1 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
}
@@ -1074,7 +1073,6 @@ NTSTATUS ndr_push_echo_TestEnum(struct ndr_push *ndr, int flags, const struct ec
if (r->out.foo2 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
if (r->out.foo3 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.foo1 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
}
@@ -1108,7 +1106,6 @@ NTSTATUS ndr_pull_echo_TestEnum(struct ndr_pull *ndr, int flags, struct echo_Tes
}
_mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.foo3, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.foo1 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
@@ -1139,7 +1136,6 @@ NTSTATUS ndr_pull_echo_TestEnum(struct ndr_pull *ndr, int flags, struct echo_Tes
}
_mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.foo3, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.foo1 == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
diff --git a/source/librpc/gen_ndr/ndr_initshutdown.c b/source/librpc/gen_ndr/ndr_initshutdown.c
index 3341d5cbaa8..aa35a8dd050 100644
--- a/source/librpc/gen_ndr/ndr_initshutdown.c
+++ b/source/librpc/gen_ndr/ndr_initshutdown.c
@@ -50,8 +50,8 @@ _PUBLIC_ NTSTATUS ndr_push_initshutdown_String(struct ndr_push *ndr, int ndr_fla
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->name->name)*2));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name->name)*2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->name->name) * 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name->name) * 2));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
@@ -92,8 +92,8 @@ _PUBLIC_ void ndr_print_initshutdown_String(struct ndr_print *ndr, const char *n
{
ndr_print_struct(ndr, name, "initshutdown_String");
ndr->depth++;
- ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->name->name)*2:r->name_len);
- ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name->name)*2:r->name_size);
+ ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->name->name) * 2:r->name_len);
+ ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name->name) * 2:r->name_size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
if (r->name) {
diff --git a/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
index f780b676e02..d07fb0054b6 100644
--- a/source/librpc/gen_ndr/ndr_lsa.c
+++ b/source/librpc/gen_ndr/ndr_lsa.c
@@ -8,16 +8,16 @@ _PUBLIC_ NTSTATUS ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*strlen_m(r->string)));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*strlen_m(r->string)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->string) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*strlen_m(r->string)/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*strlen_m(r->string)/2));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2*strlen_m(r->string)/2, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
}
}
return NT_STATUS_OK;
@@ -51,10 +51,10 @@ _PUBLIC_ NTSTATUS ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struc
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
}
if (r->string) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
}
if (r->string) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
}
}
return NT_STATUS_OK;
@@ -64,8 +64,8 @@ _PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, cons
{
ndr_print_struct(ndr, name, "lsa_String");
ndr->depth++;
- ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*strlen_m(r->string):r->length);
- ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*strlen_m(r->string):r->size);
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->size);
ndr_print_ptr(ndr, "string", r->string);
ndr->depth++;
if (r->string) {
@@ -79,16 +79,16 @@ _PUBLIC_ NTSTATUS ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags,
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*strlen_m(r->string)));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*(strlen_m(r->string)+1)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * strlen_m(r->string)));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2 * (strlen_m(r->string) + 1)));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->string) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*(strlen_m(r->string)+1)/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * (strlen_m(r->string) + 1) / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*strlen_m(r->string)/2));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2*strlen_m(r->string)/2, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m(r->string) / 2));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2 * strlen_m(r->string) / 2, sizeof(uint16_t), CH_UTF16));
}
}
return NT_STATUS_OK;
@@ -122,10 +122,10 @@ _PUBLIC_ NTSTATUS ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags,
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
}
if (r->string) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
}
if (r->string) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length / 2));
}
}
return NT_STATUS_OK;
@@ -135,8 +135,8 @@ _PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name,
{
ndr_print_struct(ndr, name, "lsa_StringLarge");
ndr->depth++;
- ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*strlen_m(r->string):r->length);
- ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*(strlen_m(r->string)+1):r->size);
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m(r->string):r->length);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * (strlen_m(r->string) + 1):r->size);
ndr_print_ptr(ndr, "string", r->string);
ndr->depth++;
if (r->string) {
diff --git a/source/librpc/gen_ndr/ndr_netlogon.c b/source/librpc/gen_ndr/ndr_netlogon.c
index b014c6aa077..7990a8504e9 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -245,10 +245,10 @@ NTSTATUS ndr_push_netr_AcctLockStr(struct ndr_push *ndr, int ndr_flags, const st
}
if (ndr_flags & NDR_BUFFERS) {
if (r->bindata) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length/2));
- for (cntr_bindata_1 = 0; cntr_bindata_1 < r->length/2; cntr_bindata_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length / 2));
+ for (cntr_bindata_1 = 0; cntr_bindata_1 < r->length / 2; cntr_bindata_1++) {
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->bindata[cntr_bindata_1]));
}
}
@@ -285,17 +285,17 @@ NTSTATUS ndr_pull_netr_AcctLockStr(struct ndr_pull *ndr, int ndr_flags, struct n
NDR_PULL_ALLOC_N(ndr, r->bindata, ndr_get_array_size(ndr, &r->bindata));
_mem_save_bindata_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->bindata, 0);
- for (cntr_bindata_1 = 0; cntr_bindata_1 < r->length/2; cntr_bindata_1++) {
+ for (cntr_bindata_1 = 0; cntr_bindata_1 < r->length / 2; cntr_bindata_1++) {
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->bindata[cntr_bindata_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bindata_1, 0);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bindata_0, 0);
}
if (r->bindata) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bindata, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->bindata, r->size / 2));
}
if (r->bindata) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bindata, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->bindata, r->length / 2));
}
}
return NT_STATUS_OK;
@@ -311,9 +311,9 @@ _PUBLIC_ void ndr_print_netr_AcctLockStr(struct ndr_print *ndr, const char *name
ndr_print_ptr(ndr, "bindata", r->bindata);
ndr->depth++;
if (r->bindata) {
- ndr->print(ndr, "%s: ARRAY(%d)", "bindata", r->length/2);
+ ndr->print(ndr, "%s: ARRAY(%d)", "bindata", r->length / 2);
ndr->depth++;
- for (cntr_bindata_1=0;cntr_bindata_1<r->length/2;cntr_bindata_1++) {
+ for (cntr_bindata_1=0;cntr_bindata_1<r->length / 2;cntr_bindata_1++) {
char *idx_1=NULL;
asprintf(&idx_1, "[%d]", cntr_bindata_1);
if (idx_1) {
@@ -3040,8 +3040,8 @@ NTSTATUS ndr_push_netr_DELTA_POLICY(struct ndr_push *ndr, int ndr_flags, const s
}
if (ndr_flags & NDR_BUFFERS) {
if (r->eventauditoptions) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount+1));
- for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < r->maxauditeventcount+1; cntr_eventauditoptions_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxauditeventcount + 1));
+ for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < r->maxauditeventcount + 1; cntr_eventauditoptions_1++) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eventauditoptions[cntr_eventauditoptions_1]));
}
}
@@ -3107,7 +3107,7 @@ NTSTATUS ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct
NDR_PULL_ALLOC_N(ndr, r->eventauditoptions, ndr_get_array_size(ndr, &r->eventauditoptions));
_mem_save_eventauditoptions_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->eventauditoptions, 0);
- for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < r->maxauditeventcount+1; cntr_eventauditoptions_1++) {
+ for (cntr_eventauditoptions_1 = 0; cntr_eventauditoptions_1 < r->maxauditeventcount + 1; cntr_eventauditoptions_1++) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eventauditoptions[cntr_eventauditoptions_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventauditoptions_1, 0);
@@ -3126,7 +3126,7 @@ NTSTATUS ndr_pull_netr_DELTA_POLICY(struct ndr_pull *ndr, int ndr_flags, struct
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown3));
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->unknown4));
if (r->eventauditoptions) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount+1));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->eventauditoptions, r->maxauditeventcount + 1));
}
}
return NT_STATUS_OK;
@@ -3144,9 +3144,9 @@ _PUBLIC_ void ndr_print_netr_DELTA_POLICY(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "eventauditoptions", r->eventauditoptions);
ndr->depth++;
if (r->eventauditoptions) {
- ndr->print(ndr, "%s: ARRAY(%d)", "eventauditoptions", r->maxauditeventcount+1);
+ ndr->print(ndr, "%s: ARRAY(%d)", "eventauditoptions", r->maxauditeventcount + 1);
ndr->depth++;
- for (cntr_eventauditoptions_1=0;cntr_eventauditoptions_1<r->maxauditeventcount+1;cntr_eventauditoptions_1++) {
+ for (cntr_eventauditoptions_1=0;cntr_eventauditoptions_1<r->maxauditeventcount + 1;cntr_eventauditoptions_1++) {
char *idx_1=NULL;
asprintf(&idx_1, "[%d]", cntr_eventauditoptions_1);
if (idx_1) {
@@ -6252,10 +6252,10 @@ NTSTATUS ndr_push_netr_BinaryString(struct ndr_push *ndr, int ndr_flags, const s
}
if (ndr_flags & NDR_BUFFERS) {
if (r->data) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length/2));
- for (cntr_data_1 = 0; cntr_data_1 < r->length/2; cntr_data_1++) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length / 2));
+ for (cntr_data_1 = 0; cntr_data_1 < r->length / 2; cntr_data_1++) {
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->data[cntr_data_1]));
}
}
@@ -6297,17 +6297,17 @@ NTSTATUS ndr_pull_netr_BinaryString(struct ndr_pull *ndr, int ndr_flags, struct
NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
_mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
- for (cntr_data_1 = 0; cntr_data_1 < r->length/2; cntr_data_1++) {
+ for (cntr_data_1 = 0; cntr_data_1 < r->length / 2; cntr_data_1++) {
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data[cntr_data_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
}
if (r->data) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->size / 2));
}
if (r->data) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length / 2));
}
}
ndr->flags = _flags_save_STRUCT;
@@ -6328,9 +6328,9 @@ _PUBLIC_ void ndr_print_netr_BinaryString(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "data", r->data);
ndr->depth++;
if (r->data) {
- ndr->print(ndr, "%s: ARRAY(%d)", "data", r->length/2);
+ ndr->print(ndr, "%s: ARRAY(%d)", "data", r->length / 2);
ndr->depth++;
- for (cntr_data_1=0;cntr_data_1<r->length/2;cntr_data_1++) {
+ for (cntr_data_1=0;cntr_data_1<r->length / 2;cntr_data_1++) {
char *idx_1=NULL;
asprintf(&idx_1, "[%d]", cntr_data_1);
if (idx_1) {
diff --git a/source/librpc/gen_ndr/ndr_srvsvc.c b/source/librpc/gen_ndr/ndr_srvsvc.c
index 04142231ab1..2c919bc6d97 100644
--- a/source/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source/librpc/gen_ndr/ndr_srvsvc.c
@@ -12979,7 +12979,6 @@ NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const s
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -12992,7 +12991,6 @@ NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const s
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -13048,7 +13046,6 @@ NTSTATUS ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -13085,7 +13082,6 @@ NTSTATUS ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -13394,7 +13390,6 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -13407,7 +13402,6 @@ NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -13483,7 +13477,6 @@ NTSTATUS ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -13520,7 +13513,6 @@ NTSTATUS ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -14085,7 +14077,6 @@ NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const stru
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -14098,7 +14089,6 @@ NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const stru
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -14174,7 +14164,6 @@ NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srv
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -14211,7 +14200,6 @@ NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srv
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -14334,7 +14322,6 @@ NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const stru
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -14347,7 +14334,6 @@ NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const stru
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -14443,7 +14429,6 @@ NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srv
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -14480,7 +14465,6 @@ NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srv
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -14787,7 +14771,6 @@ NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const stru
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -14800,7 +14783,6 @@ NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const stru
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -14896,7 +14878,6 @@ NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srv
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -14933,7 +14914,6 @@ NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srv
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -15319,7 +15299,6 @@ NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -15332,7 +15311,6 @@ NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -15388,7 +15366,6 @@ NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -15425,7 +15402,6 @@ NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -16679,7 +16655,6 @@ NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.transports == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.transports, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -16692,7 +16667,6 @@ NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.transports == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.transports, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -16748,7 +16722,6 @@ NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struc
}
_mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.transports, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
@@ -16785,7 +16758,6 @@ NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struc
}
_mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.transports, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
@@ -17773,7 +17745,6 @@ NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const str
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -17786,7 +17757,6 @@ NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const str
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -17842,7 +17812,6 @@ NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct sr
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -17879,7 +17848,6 @@ NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct sr
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
diff --git a/source/librpc/gen_ndr/ndr_unixinfo.c b/source/librpc/gen_ndr/ndr_unixinfo.c
index 026a8abc967..b85cc0319a9 100644
--- a/source/librpc/gen_ndr/ndr_unixinfo.c
+++ b/source/librpc/gen_ndr/ndr_unixinfo.c
@@ -363,7 +363,6 @@ NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unix
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
if (r->in.uids) {
- if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count));
}
}
@@ -388,7 +387,6 @@ NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unix
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_0, 0);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
if (r->out.infos) {
- if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.infos, *r->out.count));
}
}
diff --git a/source/librpc/gen_ndr/ndr_winreg.c b/source/librpc/gen_ndr/ndr_winreg.c
index a9a8814e7b0..c287495681e 100644
--- a/source/librpc/gen_ndr/ndr_winreg.c
+++ b/source/librpc/gen_ndr/ndr_winreg.c
@@ -66,8 +66,8 @@ _PUBLIC_ NTSTATUS ndr_push_winreg_String(struct ndr_push *ndr, int ndr_flags, co
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name)*2));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name)*2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
@@ -117,8 +117,8 @@ _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, c
{
ndr_print_struct(ndr, name, "winreg_String");
ndr->depth++;
- ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name)*2:r->name_len);
- ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name)*2:r->name_size);
+ ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_len);
+ ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
if (r->name) {
@@ -268,16 +268,16 @@ NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const st
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name)*2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->name) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name)*2/2));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name)*2/2, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2 / 2));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
}
}
return NT_STATUS_OK;
@@ -311,10 +311,10 @@ NTSTATUS ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct w
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
}
if (r->name) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
}
if (r->name) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
}
}
return NT_STATUS_OK;
@@ -324,7 +324,7 @@ _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name
{
ndr_print_struct(ndr, name, "winreg_StringBuf");
ndr->depth++;
- ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name)*2:r->length);
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name) * 2:r->length);
ndr_print_uint16(ndr, "size", r->size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
@@ -339,16 +339,16 @@ NTSTATUS ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const s
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name)*2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->name) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size/2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name)*2/2));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name)*2/2, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2 / 2));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
}
}
return NT_STATUS_OK;
@@ -382,10 +382,10 @@ NTSTATUS ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
}
if (r->name) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size/2));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
}
if (r->name) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length/2));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
}
}
return NT_STATUS_OK;
@@ -395,7 +395,7 @@ _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *nam
{
ndr_print_struct(ndr, name, "winreg_ValNameBuf");
ndr->depth++;
- ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name)*2:r->length);
+ ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length);
ndr_print_uint16(ndr, "size", r->size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
@@ -1711,6 +1711,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr_print_ptr(ndr, "data", r->in.data);
ndr->depth++;
if (r->in.data) {
+ if (r->in.value_length == NULL) return;
ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length);
}
ndr->depth--;
@@ -1744,6 +1745,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr_print_ptr(ndr, "data", r->out.data);
ndr->depth++;
if (r->out.data) {
+ if (r->out.value_length == NULL) return;
ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length);
}
ndr->depth--;
@@ -2609,6 +2611,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "data", r->in.data);
ndr->depth++;
if (r->in.data) {
+ if (r->in.value_length == NULL) return;
ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.value_length);
}
ndr->depth--;
@@ -2638,6 +2641,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr_print_ptr(ndr, "data", r->out.data);
ndr->depth++;
if (r->out.data) {
+ if (r->out.value_length == NULL) return;
ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.value_length);
}
ndr->depth--;
@@ -3590,11 +3594,9 @@ NTSTATUS ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, st
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.values, r->in.num_values));
}
if (r->in.buffer) {
- if (r->in.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
}
if (r->in.buffer) {
- if (r->in.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
}
}
@@ -3650,11 +3652,9 @@ NTSTATUS ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, int flags, st
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.values, r->in.num_values));
}
if (r->out.buffer) {
- if (r->out.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
}
if (r->out.buffer) {
- if (r->out.buffer_size == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
}
}
diff --git a/source/librpc/gen_ndr/ndr_wkssvc.c b/source/librpc/gen_ndr/ndr_wkssvc.c
index 52685e1dbc6..2af358727c3 100644
--- a/source/librpc/gen_ndr/ndr_wkssvc.c
+++ b/source/librpc/gen_ndr/ndr_wkssvc.c
@@ -2680,7 +2680,6 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
@@ -2691,7 +2690,6 @@ NTSTATUS ndr_push_wkssvc_NetWkstaTransportEnum(struct ndr_push *ndr, int flags,
if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_push_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.totalentries));
@@ -2747,7 +2745,6 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
@@ -2779,7 +2776,6 @@ NTSTATUS ndr_pull_wkssvc_NetWkstaTransportEnum(struct ndr_pull *ndr, int flags,
}
_mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
- if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
NDR_CHECK(ndr_pull_wkssvc_NetWkstaTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);