1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r5360: Remove a couple of unused functions.

(This used to be commit d8a0a69721)
This commit is contained in:
Jelmer Vernooij 2005-02-12 19:28:23 +00:00 committed by Gerald (Jerry) Carter
parent e199f4cef2
commit 67bc7ddbe9
4 changed files with 1 additions and 48 deletions

View File

@ -551,7 +551,7 @@ sub ParseElementPrintScalar($$)
if (util::is_fixed_array($e)) {
ParseElementPrintBuffer($e, $var_prefix);
} elsif (util::has_direct_buffers($e)) {
} elsif ($e->{POINTERS} || util::array_size($e)) {
pidl "\tndr_print_ptr(ndr, \"$e->{NAME}\", $var_prefix$e->{NAME});\n";
pidl "\tndr->depth++;\n";
ParseElementPrintBuffer($e, $var_prefix);

View File

@ -306,16 +306,6 @@ sub array_size($)
return undef;
}
# determine if an element has a direct buffers component
sub has_direct_buffers($)
{
my $e = shift;
if ($e->{POINTERS} || array_size($e)) {
return 1;
}
return 0;
}
# return 1 if the string is a C constant
sub is_constant($)
{

View File

@ -234,9 +234,6 @@ enum ndr_err_code {
#define NDR_PUSH_ALLOC(ndr, s) NDR_PUSH_ALLOC_SIZE(ndr, s, sizeof(*(s)))
/* these are used when generic fn pointers are needed for ndr push/pull fns */
typedef NTSTATUS (*ndr_push_fn_t)(struct ndr_push *, void *);
typedef NTSTATUS (*ndr_pull_fn_t)(struct ndr_pull *, void *);
typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, void *);
typedef NTSTATUS (*ndr_push_const_fn_t)(struct ndr_push *, int ndr_flags, const void *);
typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *);

View File

@ -469,22 +469,6 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
handle subcontext buffers, which in midl land are user-marshalled, but
we use magic in pidl to make them easier to cope with
*/
NTSTATUS ndr_pull_subcontext_fn(struct ndr_pull *ndr, size_t sub_size,
void *base, ndr_pull_fn_t fn)
{
struct ndr_pull *ndr2;
NDR_ALLOC(ndr, ndr2);
NDR_CHECK(ndr_pull_subcontext_header(ndr, sub_size, ndr2));
NDR_CHECK(fn(ndr2, base));
if (sub_size) {
NDR_CHECK(ndr_pull_advance(ndr, ndr2->data_size));
} else {
NDR_CHECK(ndr_pull_advance(ndr, ndr2->offset));
}
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_subcontext_flags_fn(struct ndr_pull *ndr, size_t sub_size,
void *base, ndr_pull_flags_fn_t fn)
{
@ -547,24 +531,6 @@ static NTSTATUS ndr_push_subcontext_header(struct ndr_push *ndr,
handle subcontext buffers, which in midl land are user-marshalled, but
we use magic in pidl to make them easier to cope with
*/
NTSTATUS ndr_push_subcontext_fn(struct ndr_push *ndr, size_t sub_size,
void *base, ndr_push_fn_t fn)
{
struct ndr_push *ndr2;
ndr2 = ndr_push_init_ctx(ndr);
if (!ndr2) return NT_STATUS_NO_MEMORY;
ndr2->flags = ndr->flags;
NDR_CHECK(fn(ndr2, base));
NDR_CHECK(ndr_push_subcontext_header(ndr, sub_size, ndr2));
NDR_CHECK(ndr_push_bytes(ndr, ndr2->data, ndr2->offset));
return NT_STATUS_OK;
}
/*
handle subcontext buffers for function that take a flags arg
*/
NTSTATUS ndr_push_subcontext_flags_fn(struct ndr_push *ndr, size_t sub_size,
void *base, ndr_push_flags_fn_t fn)
{