diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-09-21 03:48:09 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-09-28 23:06:49 +0200 |
commit | 7fff22c29dfb4bd424c08da53c384dcc2c37fe22 (patch) | |
tree | e919c2f02603dc783f727f43a34ff40163bb524e /pidl/lib/Parse/Pidl/Samba4/NDR | |
parent | 3fa29cdd943f18871b16fc845028fc39a5a7ad0d (diff) | |
download | samba-7fff22c29dfb4bd424c08da53c384dcc2c37fe22.tar.gz samba-7fff22c29dfb4bd424c08da53c384dcc2c37fe22.tar.bz2 samba-7fff22c29dfb4bd424c08da53c384dcc2c37fe22.zip |
pidl:NDR/Parser: simplify logic in ParseMemCtxPullFlags()
metze
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4/NDR')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 7f958ab71c..b5393613f6 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -951,12 +951,10 @@ sub ParseMemCtxPullFlags($$$$) if (($l->{TYPE} eq "POINTER") and ($l->{POINTER_TYPE} eq "ref")) { my $nl = GetNextLevel($e, $l); - my $next_is_array = ($nl->{TYPE} eq "ARRAY"); - my $next_is_string = (($nl->{TYPE} eq "DATA") and - ($nl->{DATA_TYPE} eq "string")); - if ($next_is_array or $next_is_string) { - return undef; - } elsif ($l->{LEVEL} eq "TOP") { + return undef if ($nl->{TYPE} eq "ARRAY"); + return undef if (($nl->{TYPE} eq "DATA") and ($nl->{DATA_TYPE} eq "string")); + + if ($l->{LEVEL} eq "TOP") { $mem_flags = "LIBNDR_FLAG_REF_ALLOC"; } } |