summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-11-25 14:21:32 +0100
committerKarolin Seeger <kseeger@samba.org>2009-11-26 14:13:54 +0100
commit164a33d4e9d6b90507d2db96a24c67eb514b5af4 (patch)
tree05cf6ef5b936223e5dd5532c0c704fa71d34b396 /pidl
parente3bcc3ee957a61b2ce1c948f3337cc0f7d795e74 (diff)
downloadsamba-164a33d4e9d6b90507d2db96a24c67eb514b5af4.tar.gz
pidl:NDR/Parser: $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 (cherry picked from commit ab1c92950f3cfdc8c52b772ecef23a5477f48f9d) (cherry picked from commit e58955fd4ca1500e58045417711b469a485419af)
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 11a43b4509d..820aee6c477 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2135,7 +2135,7 @@ sub AllocateArrayLevel($$$$$$)
$self->pidl("}");
if (grep(/in/,@{$e->{DIRECTION}}) and
grep(/out/,@{$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}));");
}
return;
}