ts-hosts-allocate-Executive: Fix an undefined warning
PATCH 1/1 ts-hosts-allocate-Executive: Fix an undefined warning
$esrow is autovivified as { } by
$candrow->{EquivMostRecentStatus} = $esrow->{status}so use %$esrow which in scalar context is true iff the hash is nonempty.
Signed-off-by Ian Jackson <[email protected]>
--- ts-hosts-allocate-Executive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-hosts-allocate-Executive +1 -1
@@ -372,7 +372,7 @@ END $candrow->{EquivMostRecentStatus} = $esrow->{status}; print DEBUG "$dbg EQUIV-MOST-RECENT "; print DEBUG ("$esrow->{flight}.$esrow->{job}". - " $esrow->{val} $esrow->{status}") if $esrow; + " $esrow->{val} $esrow->{status}") if %$esrow; print DEBUG ".\n"; }
Signature · 1 line
1.7.10.4
Quoted 6 lines · Ian Jackson
$esrow is autovivified as { } by
$candrow->{EquivMostRecentStatus} = $esrow->{status}so use %$esrow which in scalar context is true iff the hash is nonempty.
Signed-off-by Ian Jackson <[email protected]>
Acked-by Ian Campbell <[email protected]>
I'll either push this ontop of the existing queue if that needs restarting for some reason, or along with the libvirt stuff which we discussed would go in next (along with your ap-push linux cleanups)
Quoted 17 lines
--- ts-hosts-allocate-Executive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ts-hosts-allocate-Executive +1
-1@@ -372,7 +372,7 @@ END $candrow->{EquivMostRecentStatus} = $esrow->{status}; print DEBUG "$dbg EQUIV-MOST-RECENT "; print DEBUG ("$esrow->{flight}.$esrow->{job}". - " $esrow->{val} $esrow->{status}") if $esrow; + " $esrow->{val} $esrow->{status}") if %$esrow; print DEBUG ".\n"; }