diff options
author | Günther Deschner <gd@samba.org> | 2009-02-06 18:51:36 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-06 18:53:40 +0100 |
commit | 2bbe0c2859487e286f90d0ab7305da54aed5f1e1 (patch) | |
tree | 0d516aa681959022ab660d09b1969c743c91f325 /pidl/lib/Parse/Pidl/Samba3 | |
parent | 143a5b89eeb669640299e67d82decb38512d4f3c (diff) | |
download | samba-2bbe0c2859487e286f90d0ab7305da54aed5f1e1.tar.gz samba-2bbe0c2859487e286f90d0ab7305da54aed5f1e1.tar.bz2 samba-2bbe0c2859487e286f90d0ab7305da54aed5f1e1.zip |
pidl: return early when AllocOutVar() in s3 server generator has nothing to do.
Jelmer, Metze, please check.
Guenther
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba3')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 33dc68e753..c9a8eea59f 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -58,14 +58,17 @@ sub AllocOutVar($$$$$) if ($l->{TYPE} eq "POINTER") { my $nl = GetNextLevel($e, $l); $l = $nl if ($nl->{TYPE} eq "ARRAY"); - } + } elsif # we don't support multi-dimentional arrays yet - if ($l->{TYPE} eq "ARRAY") { + ($l->{TYPE} eq "ARRAY") { my $nl = GetNextLevel($e, $l); if ($nl->{TYPE} eq "ARRAY") { fatal($e->{ORIGINAL},"multi-dimentional [out] arrays are not supported!"); } + } else { + # neither pointer nor array, no need to alloc something. + return; } if ($l->{TYPE} eq "ARRAY") { |