summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2019-12-07 22:45:47 +1300
committerAndrew Bartlett <abartlet@samba.org>2020-02-04 05:13:39 +0000
commit7a65a26a2fb355d34801b5559c59cd82388646a8 (patch)
tree1f002faa7405301520509fe01e8f9fc765ba6000
parent6c4ee5282e024b5cdeca30ffd0b29adcdeed1ab2 (diff)
downloadsamba-7a65a26a2fb355d34801b5559c59cd82388646a8.tar.gz
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>
-rwxr-xr-xselftest/target/Samba4.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 6f26d8a56f8..91e0878681a 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -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;