summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-24 03:31:03 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-24 03:31:03 +0000
commit3114289c6434165a23996cb481dea619ee62d55f (patch)
tree1d7c393c88409cd9bca21cc62f5159b5006858f6 /source4/build
parente4773b184cd6ccf1e46ec151afbfd9fb9ad3ede8 (diff)
downloadsamba-3114289c6434165a23996cb481dea619ee62d55f.tar.gz
samba-3114289c6434165a23996cb481dea619ee62d55f.tar.bz2
samba-3114289c6434165a23996cb481dea619ee62d55f.zip
make sure we don't try to update a constant
(This used to be commit 4a6034f2e37d1050364fc167f1b71b5c806dfdc9)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/parser.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index 788660c198..e536ab083d 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -295,7 +295,10 @@ sub ParseArrayPull($$$)
pidl "\t\tif ($size != _array_size) {\n";
}
pidl "\t\t\treturn ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, \"Bad array size %u should be %u\", _array_size, $size);\n";
- pidl "\t\t} else { $size = _array_size; }\n";
+ pidl "\t\t}\n";
+ if ($size =~ /r->/) {
+ pidl "else { $size = _array_size; }\n";
+ }
pidl "\t}\n";
}
@@ -425,7 +428,10 @@ sub ParseElementPullSwitch($$$$)
} else {
pidl "\t\tif (_level != $switch_var) {\n";
}
- pidl "\t\t\treturn ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, \"Bad switch value %u in $e->{NAME}\");\t\t} else { $switch_var = _level; }\n";
+ pidl "\t\t\treturn ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, \"Bad switch value %u in $e->{NAME}\");\t\t}\n";
+ if ($switch =~ /r->/) {
+ pidl "else { $switch_var = _level; }\n";
+ }
pidl "\t}\n";
}