1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

pidl: Wireshark: Don't assign hash undef, assign it an empty array

Pick up change from Wireshark:

    commit ade6577f109e2bf741909226254b758e79a816f1
    Author: John Thacker <johnthacker@gmail.com>
    Date:   Fri Jun 21 20:27:51 2024 -0400

        pidl: Don't assign hash undef, assign it an empty array

        Perl works, but complains if warnings are on, if a hash is
        initialized to undef instead of to empty. Upstream Samba turned on
        warnings in the next commit to catch things like this.

Signed-off-by: John Thacker <johnthacker@gmail.com>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
John Thacker 2024-07-03 08:00:59 -04:00 committed by Stefan Metzmacher
parent 5b12d3d2e7
commit 9870457e96

View File

@ -584,7 +584,7 @@ sub Function($$$)
my %dissectornames;
foreach (@{$fn->{ELEMENTS}}) {
$dissectornames{$_->{NAME}} = $self->Element($_, $fn->{NAME}, $ifname, undef, undef) if not defined($dissectornames{$_->{NAME}});
$dissectornames{$_->{NAME}} = $self->Element($_, $fn->{NAME}, $ifname, undef, ()) if not defined($dissectornames{$_->{NAME}});
}
my $fn_name = $_->{NAME};
@ -814,7 +814,7 @@ sub Union($$$$)
foreach (@{$e->{ELEMENTS}}) {
$res.="\n\t\t$_->{CASE}:\n";
if ($_->{TYPE} ne "EMPTY") {
$res.="\t\t\t".$self->Element($_, $name, $ifname, undef, undef)."\n";
$res.="\t\t\t".$self->Element($_, $name, $ifname, undef, ())."\n";
}
$res.="\t\tbreak;\n";
}