Revert "sq h2"
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Jan 2016 12:49:18 +0000 (13:49 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Oct 2018 14:09:07 +0000 (16:09 +0200)
This reverts commit cd2d739ed5463692fb6cf0355c6e8bc2f5bbda22.

tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm

index ef550ee90cabecd5b73903540128a6b12cf682e6..41d788ffcef0b882f7a7893639d884abf8e1d616 100644 (file)
@@ -693,10 +693,10 @@ sub Struct($$$$)
        # will contain the switch var declaration;
        my $vars = [];
        my %switch_hash;
-       foreach my $el (@{$e->{ELEMENTS}}) {
-               if (has_property($el, "switch_is")) {
-                       $varswitchs->{$el->{PROPERTIES}->{switch_is}} = [];
-                       $switch_hash{ $el->{PROPERTIES}->{switch_is}} =  $el->{PROPERTIES}->{switch_is};
+       foreach (@{$e->{ELEMENTS}}) {
+               if (has_property($_, "switch_is")) {
+                       $varswitchs->{$_->{PROPERTIES}->{switch_is}} = [];
+                       $switch_hash{ $_->{PROPERTIES}->{switch_is}} =  $_->{PROPERTIES}->{switch_is};
                }
        }
        foreach (@{$e->{ELEMENTS}}) {
@@ -718,12 +718,12 @@ sub Struct($$$$)
                        $varswitchs->{$v} = $switch_info;
                }
 
-               if (has_property($el, "switch_is")) {
-                       my $varswitch = $el->{PROPERTIES}->{switch_is};
+               if (has_property($_, "switch_is")) {
+                       my $varswitch = $_->{PROPERTIES}->{switch_is};
                        $switch_info = $varswitchs->{$varswitch};
                }
 
-               $res.="\t".$self->Element($el, $name, $ifname, $switch_info, %switch_hash)."\n\n";
+               $res.="\t".$self->Element($_, $name, $ifname, $switch_info, %switch_hash)."\n\n";
        }
 
        my $doalign = undef;