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>
This commit is contained in:
Guy Harris 2014-11-03 11:55:34 -08:00
parent 26d4fb0f39
commit 9299bf48ae
1 changed files with 4 additions and 4 deletions

View File

@ -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, &parameter);");
$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;");