diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-02-13 13:04:54 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-02-13 13:09:17 +0100 |
commit | 4218856ba908e793c7e5e1edb9153c9036c843a4 (patch) | |
tree | d8408784560e77c89fea409ac064fe04aa4e0e56 /source4 | |
parent | 272892277440cbde79039d6cdaf4fb4215b7cf0c (diff) | |
download | samba-4218856ba908e793c7e5e1edb9153c9036c843a4.tar.gz samba-4218856ba908e793c7e5e1edb9153c9036c843a4.tar.bz2 samba-4218856ba908e793c7e5e1edb9153c9036c843a4.zip |
pidl: $size can be 'foo / 2' so we need to add '(' and ')'
'foo / 5 * sizeof(bar)' isn't the same as
'(foo / 2) * sizeof(bar)'.
metze
(This used to be commit a496abc4042a98835d485769e0972826da161984)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 4 |
1 files changed, 2 insertions, 2 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});"); |