1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

selftest/s4: properly initialise an empty hash

The '%ret = {}' construction was bad because '{}' is a hash-ref, which
counts as a single scalar value, but a true hash like '%ret' must be
initialised with an even number of scalar values (usually in pairs, like
'($a => $b, $c => $d)').

I think this meant %ret was initialised as something harmless like
'(<HASH(0x55ce39781278)> => undef)'.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2019-12-07 22:45:47 +13:00 committed by Andrew Bartlett
parent 6c4ee5282e
commit 7a65a26a2f

View File

@ -1756,7 +1756,7 @@ sub provision_rodc($$$)
sub read_config_h($)
{
my ($name) = @_;
my %ret = {};
my %ret;
open(LF, "<$name") or die("unable to read $name: $!");
while (<LF>) {
chomp;