summaryrefslogtreecommitdiffstats
path: root/pidl/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-11-25 14:31:34 +0100
committerStefan Metzmacher <metze@samba.org>2009-11-26 11:47:42 +0100
commita20e095b1fffb6d690609c924d03cafedbbce8f3 (patch)
treeb814489c4276d6ae2924fbd4a32eba7d32bf0a5f /pidl/lib
parentab1c92950f3cfdc8c52b772ecef23a5477f48f9d (diff)
downloadsamba-a20e095b1fffb6d690609c924d03cafedbbce8f3.tar.gz
samba-a20e095b1fffb6d690609c924d03cafedbbce8f3.tar.xz
samba-a20e095b1fffb6d690609c924d03cafedbbce8f3.zip
pidl:Samba3/ClientNDR: $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
Diffstat (limited to 'pidl/lib')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 3fc63a49991..b26a08e0292 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -105,9 +105,9 @@ sub ParseOutputArgument($$$;$$)
} else {
my $size_is = ParseExpr($l->{SIZE_IS}, $env, $e->{ORIGINAL});
if (has_property($e, "charset")) {
- $self->pidl("memcpy(CONST_DISCARD(char *, $o$e->{NAME}), ${r}out.$e->{NAME}, $size_is * sizeof(*$o$e->{NAME}));");
+ $self->pidl("memcpy(discard_const_p(uint8_t, $o$e->{NAME}), ${r}out.$e->{NAME}, ($size_is) * sizeof(*$o$e->{NAME}));");
} else {
- $self->pidl("memcpy($o$e->{NAME}, ${r}out.$e->{NAME}, $size_is * sizeof(*$o$e->{NAME}));");
+ $self->pidl("memcpy($o$e->{NAME}, ${r}out.$e->{NAME}, ($size_is) * sizeof(*$o$e->{NAME}));");
}
}
} else {