diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-02-14 13:37:37 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-02-14 13:37:37 +1100 |
commit | 501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095 (patch) | |
tree | ce7e7914cf366f3abd52b07d5244a558de5eb28b /source4/pidl | |
parent | 039f85835d60ae48c4176891598cf24e18d0cd0a (diff) | |
parent | 411776505cea3932a196e8439a8198b4e419d901 (diff) | |
download | samba-501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095.tar.gz samba-501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095.tar.bz2 samba-501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 309cf408e01c36e2a12ed2d1462f2bbe407d4597)
Diffstat (limited to 'source4/pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 4 | ||||
-rwxr-xr-x | source4/pidl/tests/wireshark-conf.pl | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 60d5bf8781..ef3eb3dbcf 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -2149,9 +2149,9 @@ sub ParseFunctionPull($$) $self->pidl("NDR_PULL_ALLOC_N(ndr, r->out.$e->{NAME}, $size);"); if (grep(/in/, @{$e->{DIRECTION}})) { - $self->pidl("memcpy(r->out.$e->{NAME}, r->in.$e->{NAME}, $size * sizeof(*r->in.$e->{NAME}));"); + $self->pidl("memcpy(r->out.$e->{NAME}, r->in.$e->{NAME}, ($size) * sizeof(*r->in.$e->{NAME}));"); } else { - $self->pidl("memset(r->out.$e->{NAME}, 0, $size * sizeof(*r->out.$e->{NAME}));"); + $self->pidl("memset(r->out.$e->{NAME}, 0, ($size) * sizeof(*r->out.$e->{NAME}));"); } } else { $self->pidl("NDR_PULL_ALLOC(ndr, r->out.$e->{NAME});"); diff --git a/source4/pidl/tests/wireshark-conf.pl b/source4/pidl/tests/wireshark-conf.pl index d6fe3158aa..c06ac16de4 100755 --- a/source4/pidl/tests/wireshark-conf.pl +++ b/source4/pidl/tests/wireshark-conf.pl @@ -5,7 +5,7 @@ use strict; use warnings; -use Test::More tests => 47; +use Test::More tests => 48; use FindBin qw($RealBin); use lib "$RealBin"; use Util; @@ -164,6 +164,9 @@ test_errors("nofile:1: no dissectorname specified\n", test_errors("nofile:1: incomplete HF_FIELD command\n", sub { parse_conf("HF_FIELD hf_idx\n"); }); +test_errors("nofile:1: incomplete ETT_FIELD command\n", + sub { parse_conf("ETT_FIELD\n"); }); + is_deeply(parse_conf("TYPE winreg_String dissect_myminregstring(); FT_STRING BASE_DEC 0 0 0 2\n"), { types => { winreg_String => { |