[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH] 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 <Ian.Jackson@xxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.