From: Ian Jackson Subject: [OSSTEST PATCH] ts-hosts-allocate-Executive: Fix an undefined warning Date: Thu, 29 Jan 2015 12:49:48 +0000 Message-ID: <1422535788-7466-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGoXn-0005kS-K9 for xen-devel@lists.xenproject.org; Thu, 29 Jan 2015 12:49:59 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org $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 --- 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