diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-11-03 11:55:34 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-11-03 19:56:22 +0000 |
commit | 9299bf48aeda33ff6854c9d4ed34fd7570640cd2 (patch) | |
tree | 0928c3d357d8853285c099dbe07f9c7feaadc194 /tools/pidl | |
parent | 26d4fb0f3977c5246335b9a18f8a98091e5839b6 (diff) | |
download | wireshark-9299bf48aeda33ff6854c9d4ed34fd7570640cd2.tar.gz |
Remove casts, make some whitespace changes in generated code.
This is the part of this change from Samba:
commit f0a6043fb201940f438f63c809df7186aa307f01
Author: Matthieu Patou <mat@matws.net>
Date: Sun Oct 5 18:25:27 2014 -0700
pidl-wireshark: handle 8 bits enum and change the signature of enum function to pass the exact type
Instead of passing a uint32 in all cases we pass the exact type
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
that wasn't already in our version.
Change-Id: I7da99cb701c2eedadeb8acb68d32f657dfa85e5b
Reviewed-on: https://code.wireshark.org/review/5097
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/pidl')
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 4aaaccfd71..61db0284dc 100644 --- a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -168,15 +168,15 @@ sub Enum($$$$) $self->pidl_code("{"); $self->indent; $self->pidl_code("g$e->{BASE_TYPE} parameter=0;"); - $self->pidl_code("if(param){"); + $self->pidl_code("if (param) {"); $self->indent; - $self->pidl_code("parameter=(g$e->{BASE_TYPE})*param;"); + $self->pidl_code("parameter = *param;"); $self->deindent; $self->pidl_code("}"); $self->pidl_code("offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, di, drep, hf_index, ¶meter);"); - $self->pidl_code("if(param){"); + $self->pidl_code("if (param) {"); $self->indent; - $self->pidl_code("*param=(guint32)parameter;"); + $self->pidl_code("*param = parameter;"); $self->deindent; $self->pidl_code("}"); $self->pidl_code("return offset;"); |