From 8bfa9351614115ceb8bfaa6f76355ddc14ec248b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 31 Jan 2007 11:48:14 +0000 Subject: r21074: Preparation for the import of samba4 notify: Add the file notify.idl and the resulting marshalling/unmarshalling routines in gen_ndr/ Volker (This used to be commit a2ea54c23456925a8ed317edb1adf82d074041fc) --- source3/librpc/gen_ndr/ndr_notify.c | 242 ++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 source3/librpc/gen_ndr/ndr_notify.c (limited to 'source3/librpc/gen_ndr/ndr_notify.c') diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c new file mode 100644 index 0000000000..c3873550bb --- /dev/null +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -0,0 +1,242 @@ +/* parser auto-generated by pidl */ + +#include "includes.h" +#include "librpc/gen_ndr/ndr_notify.h" + +_PUBLIC_ NTSTATUS ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->filter)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->subdir_filter)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->path_len)); + NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->filter)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->subdir_filter)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->path_len)); + NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server)); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r) +{ + ndr_print_struct(ndr, name, "notify_entry"); + ndr->depth++; + ndr_print_server_id(ndr, "server", &r->server); + ndr_print_uint32(ndr, "filter", r->filter); + ndr_print_uint32(ndr, "subdir_filter", r->subdir_filter); + ndr_print_string(ndr, "path", r->path); + ndr_print_uint32(ndr, "path_len", r->path_len); + ndr_print_pointer(ndr, "private_data", r->private_data); + ndr->depth--; +} + +NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r) +{ + uint32_t cntr_entries_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_mask_subdir)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_entries)); + for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { + NDR_CHECK(ndr_push_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { + NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0])); + } + } + return NT_STATUS_OK; +} + +NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r) +{ + uint32_t cntr_entries_0; + TALLOC_CTX *_mem_save_entries_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_mask_subdir)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_entries)); + NDR_PULL_ALLOC_N(ndr, r->entries, r->num_entries); + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { + NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_SCALARS, &r->entries[cntr_entries_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0); + for (cntr_entries_0 = 0; cntr_entries_0 < r->num_entries; cntr_entries_0++) { + NDR_CHECK(ndr_pull_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r) +{ + uint32_t cntr_entries_0; + ndr_print_struct(ndr, name, "notify_depth"); + ndr->depth++; + ndr_print_uint32(ndr, "max_mask", r->max_mask); + ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir); + ndr_print_uint32(ndr, "num_entries", r->num_entries); + ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->num_entries); + ndr->depth++; + for (cntr_entries_0=0;cntr_entries_0num_entries;cntr_entries_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_entries_0); + if (idx_0) { + ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ NTSTATUS ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r) +{ + uint32_t cntr_depth_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_depths)); + for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { + NDR_CHECK(ndr_push_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { + NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0])); + } + } + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r) +{ + uint32_t cntr_depth_0; + TALLOC_CTX *_mem_save_depth_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_depths)); + NDR_PULL_ALLOC_N(ndr, r->depth, r->num_depths); + _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0); + for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { + NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_SCALARS, &r->depth[cntr_depth_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_depth_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->depth, 0); + for (cntr_depth_0 = 0; cntr_depth_0 < r->num_depths; cntr_depth_0++) { + NDR_CHECK(ndr_pull_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0); + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r) +{ + uint32_t cntr_depth_0; + ndr_print_struct(ndr, name, "notify_array"); + ndr->depth++; + ndr_print_uint32(ndr, "num_depths", r->num_depths); + ndr->print(ndr, "%s: ARRAY(%d)", "depth", r->num_depths); + ndr->depth++; + for (cntr_depth_0=0;cntr_depth_0num_depths;cntr_depth_0++) { + char *idx_0=NULL; + asprintf(&idx_0, "[%d]", cntr_depth_0); + if (idx_0) { + ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + +_PUBLIC_ NTSTATUS ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 8)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->action)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_push_pointer(ndr, NDR_SCALARS, r->private_data)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ NTSTATUS ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 8)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->action)); + { + uint32_t _flags_save_string = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM); + NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path)); + ndr->flags = _flags_save_string; + } + NDR_CHECK(ndr_pull_pointer(ndr, NDR_SCALARS, &r->private_data)); + } + if (ndr_flags & NDR_BUFFERS) { + } + return NT_STATUS_OK; +} + +_PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r) +{ + ndr_print_struct(ndr, name, "notify_event"); + ndr->depth++; + ndr_print_uint32(ndr, "action", r->action); + ndr_print_string(ndr, "path", r->path); + ndr_print_pointer(ndr, "private_data", r->private_data); + ndr->depth--; +} + -- cgit From 725cbf6cc67ded9d1a68e2ef946cba22e613e199 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Sep 2007 20:03:43 +0000 Subject: r25245: rerun 'make idl' metze (This used to be commit af91f4fd08aae117d9b48eade4d49762c9634cbc) --- source3/librpc/gen_ndr/ndr_notify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_notify.c') diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c index c3873550bb..b2b8ad3454 100644 --- a/source3/librpc/gen_ndr/ndr_notify.c +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -60,7 +60,7 @@ _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, co ndr->depth--; } -NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r) +static NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r) { uint32_t cntr_entries_0; if (ndr_flags & NDR_SCALARS) { @@ -80,7 +80,7 @@ NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct return NT_STATUS_OK; } -NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r) +static NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r) { uint32_t cntr_entries_0; TALLOC_CTX *_mem_save_entries_0; -- cgit From 08ace73dbbcef5543bbaee9ba7ee16a0bd42a395 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 9 Nov 2007 14:38:47 +0100 Subject: rerun make idl metze (This used to be commit 53a636828d2ba01603401086f4a5f72f9b5ea214) --- source3/librpc/gen_ndr/ndr_notify.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_notify.c') diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c index b2b8ad3454..8abfdfdf92 100644 --- a/source3/librpc/gen_ndr/ndr_notify.c +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -3,7 +3,7 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_notify.h" -_PUBLIC_ NTSTATUS ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r) +_PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, const struct notify_entry *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); @@ -22,10 +22,10 @@ _PUBLIC_ NTSTATUS ndr_push_notify_entry(struct ndr_push *ndr, int ndr_flags, con if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r) +_PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, struct notify_entry *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); @@ -44,7 +44,7 @@ _PUBLIC_ NTSTATUS ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_flags, str if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, const struct notify_entry *r) @@ -60,7 +60,7 @@ _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, co ndr->depth--; } -static NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r) +static enum ndr_err_code ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const struct notify_depth *r) { uint32_t cntr_entries_0; if (ndr_flags & NDR_SCALARS) { @@ -77,10 +77,10 @@ static NTSTATUS ndr_push_notify_depth(struct ndr_push *ndr, int ndr_flags, const NDR_CHECK(ndr_push_notify_entry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_0])); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r) +static enum ndr_err_code ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struct notify_depth *r) { uint32_t cntr_entries_0; TALLOC_CTX *_mem_save_entries_0; @@ -105,7 +105,7 @@ static NTSTATUS ndr_pull_notify_depth(struct ndr_pull *ndr, int ndr_flags, struc } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, const struct notify_depth *r) @@ -130,7 +130,7 @@ _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, co ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r) +_PUBLIC_ enum ndr_err_code ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, const struct notify_array *r) { uint32_t cntr_depth_0; if (ndr_flags & NDR_SCALARS) { @@ -145,10 +145,10 @@ _PUBLIC_ NTSTATUS ndr_push_notify_array(struct ndr_push *ndr, int ndr_flags, con NDR_CHECK(ndr_push_notify_depth(ndr, NDR_BUFFERS, &r->depth[cntr_depth_0])); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r) +_PUBLIC_ enum ndr_err_code ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, struct notify_array *r) { uint32_t cntr_depth_0; TALLOC_CTX *_mem_save_depth_0; @@ -171,7 +171,7 @@ _PUBLIC_ NTSTATUS ndr_pull_notify_array(struct ndr_pull *ndr, int ndr_flags, str } NDR_PULL_SET_MEM_CTX(ndr, _mem_save_depth_0, 0); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, const struct notify_array *r) @@ -194,7 +194,7 @@ _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, co ndr->depth--; } -_PUBLIC_ NTSTATUS ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r) +_PUBLIC_ enum ndr_err_code ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, const struct notify_event *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 8)); @@ -209,10 +209,10 @@ _PUBLIC_ NTSTATUS ndr_push_notify_event(struct ndr_push *ndr, int ndr_flags, con } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -_PUBLIC_ NTSTATUS ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r) +_PUBLIC_ enum ndr_err_code ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, struct notify_event *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); @@ -227,7 +227,7 @@ _PUBLIC_ NTSTATUS ndr_pull_notify_event(struct ndr_pull *ndr, int ndr_flags, str } if (ndr_flags & NDR_BUFFERS) { } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } _PUBLIC_ void ndr_print_notify_event(struct ndr_print *ndr, const char *name, const struct notify_event *r) -- cgit From 9712e3c11c69e2a40ea7c156dd3515dafed833ea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Feb 2008 10:54:59 +0100 Subject: make idl: Check return value of asprintf (This used to be commit d9fb7d7bdcd0e54838ff0b1cb64a7e75d8cd726a) --- source3/librpc/gen_ndr/ndr_notify.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_notify.c') diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c index 8abfdfdf92..195d421408 100644 --- a/source3/librpc/gen_ndr/ndr_notify.c +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -120,8 +120,7 @@ _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_entries_0=0;cntr_entries_0num_entries;cntr_entries_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_entries_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) { ndr_print_notify_entry(ndr, "entries", &r->entries[cntr_entries_0]); free(idx_0); } @@ -184,8 +183,7 @@ _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, co ndr->depth++; for (cntr_depth_0=0;cntr_depth_0num_depths;cntr_depth_0++) { char *idx_0=NULL; - asprintf(&idx_0, "[%d]", cntr_depth_0); - if (idx_0) { + if (asprintf(&idx_0, "[%d]", cntr_depth_0) != -1) { ndr_print_notify_depth(ndr, "depth", &r->depth[cntr_depth_0]); free(idx_0); } -- cgit From 16a9020029f809707b38d12960db12abbd2ef1be Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 22 Jul 2008 11:54:54 +0200 Subject: re-run make idl after Jelmer's "poperly cast array lengths" pidl change. (f321240fa91fa19c1131f119c42f64897d220682) Michael (This used to be commit 962c2670b10addf81a242d8cb381cc010e036b8e) --- source3/librpc/gen_ndr/ndr_notify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/librpc/gen_ndr/ndr_notify.c') diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c index 195d421408..00ba8bc293 100644 --- a/source3/librpc/gen_ndr/ndr_notify.c +++ b/source3/librpc/gen_ndr/ndr_notify.c @@ -116,7 +116,7 @@ _PUBLIC_ void ndr_print_notify_depth(struct ndr_print *ndr, const char *name, co ndr_print_uint32(ndr, "max_mask", r->max_mask); ndr_print_uint32(ndr, "max_mask_subdir", r->max_mask_subdir); ndr_print_uint32(ndr, "num_entries", r->num_entries); - ndr->print(ndr, "%s: ARRAY(%d)", "entries", r->num_entries); + ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->num_entries); ndr->depth++; for (cntr_entries_0=0;cntr_entries_0num_entries;cntr_entries_0++) { char *idx_0=NULL; @@ -179,7 +179,7 @@ _PUBLIC_ void ndr_print_notify_array(struct ndr_print *ndr, const char *name, co ndr_print_struct(ndr, name, "notify_array"); ndr->depth++; ndr_print_uint32(ndr, "num_depths", r->num_depths); - ndr->print(ndr, "%s: ARRAY(%d)", "depth", r->num_depths); + ndr->print(ndr, "%s: ARRAY(%d)", "depth", (int)r->num_depths); ndr->depth++; for (cntr_depth_0=0;cntr_depth_0num_depths;cntr_depth_0++) { char *idx_0=NULL; -- cgit