summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-11-25 14:21:32 +0100
committerStefan Metzmacher <metze@samba.org>2009-11-26 11:47:41 +0100
commitab1c92950f3cfdc8c52b772ecef23a5477f48f9d (patch)
tree1be2de02ec0a05fa91e781e99893149e423bf39a
parent77e2d2f1d29b69699f4539abfce7b2f32db843e4 (diff)
downloadsamba-ab1c92950f3cfdc8c52b772ecef23a5477f48f9d.tar.gz
samba-ab1c92950f3cfdc8c52b772ecef23a5477f48f9d.tar.bz2
samba-ab1c92950f3cfdc8c52b772ecef23a5477f48f9d.zip
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
-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 d598989fad..af28bda108 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2140,7 +2140,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;
}