$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 <ian.jack...@eu.citrix.com>
---
 ts-hosts-allocate-Executive |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 4d5e3bb..7a9411d 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -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";
        }
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to