From patchwork Thu Apr 20 13:07:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9690343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB9CA60383 for ; Thu, 20 Apr 2017 13:09:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4FC128387 for ; Thu, 20 Apr 2017 13:09:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9C8C28433; Thu, 20 Apr 2017 13:09:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 515F628387 for ; Thu, 20 Apr 2017 13:09:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1Bo7-0003Rx-9n; Thu, 20 Apr 2017 13:07:35 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1Bo6-0003Rq-9h for xen-devel@lists.xenproject.org; Thu, 20 Apr 2017 13:07:34 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 16/25-03058-592B8F85; Thu, 20 Apr 2017 13:07:33 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRWlGSWpSXmKPExsWS0XRdVXfKph8 RBku/Wlp83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBl962YwFyxnrdj56QN7A+MWli5GLg4hgS+M Eod3t7NBOLcYJZav38cM4axklNg29QJrFyMnB5uArkTTlr9sILaIgJLEvVWTmboYOTiYBbQlz m2XBwkLC4RI7J6zBKyERUBV4ujDFUwgNq+Ah8S8rS/BxkgIKEp0P5vANoGRawEjwypGjeLUor LUIl1Dc72kosz0jJLcxMwcXUMDM73c1OLixPTUnMSkYr3k/NxNjEBPMgDBDsbbGwMOMUpyMCm J8qrN/REhxJeUn1KZkVicEV9UmpNafIhRhoNDSYJ30kagnGBRanpqRVpmDjCkYNISHDxKIrzf NgCleYsLEnOLM9MhUqcYdTnm3Pv6nkmIJS8/L1VKnHc5yAwBkKKM0jy4EbDwvsQoKyXMywh0l BBPQWpRbmYJqvwrRnEORiVh3gMgU3gy80rgNr0COoIJ6IizfmBHlCQipKQaGKVyhWO2+Ab/3p kQlqLZn2+4f8+cpJv3Ly7rfHbY634Tl4TJuewT5+MN16/ew/5N6bWZx+xo64bXzdtjVB9zrqx +f/jAmwNZnNH3HQqsWFlXNv/d1jMn5NOhGemc/Axcfm9ubnSdf8zqZ0XsxFMm9TUlHdP9/zTx nBfdc+rAy7KAxOInN5njY5VYijMSDbWYi4oTAUzllkVqAgAA X-Env-Sender: iwj@xenbits.xen.org X-Msg-Ref: server-8.tower-21.messagelabs.com!1492693652!64413060!1 X-Originating-IP: [104.130.215.37] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 52063 invoked from network); 20 Apr 2017 13:07:32 -0000 Received: from mail.xenproject.org (HELO mail.xenproject.org) (104.130.215.37) by server-8.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 20 Apr 2017 13:07:32 -0000 Received: from host146.205.237.98.conversent.net ([205.237.98.146] helo=infra.test-lab.xenproject.org) by mail.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1Bo3-0007ey-G3; Thu, 20 Apr 2017 13:07:31 +0000 Received: from [172.16.144.3] (helo=osstest.test-lab.xenproject.org) by infra.test-lab.xenproject.org with esmtp (Exim 4.80) (envelope-from ) id 1d1Bny-00047K-6A; Thu, 20 Apr 2017 13:07:26 +0000 Received: from iwj by osstest.test-lab.xenproject.org with local (Exim 4.80) (envelope-from ) id 1d1Bny-0001Mi-0P; Thu, 20 Apr 2017 13:07:26 +0000 From: Ian Jackson To: xen-devel@lists.xenproject.org Date: Thu, 20 Apr 2017 13:07:24 +0000 Message-Id: <1492693645-4714-1-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 Cc: Ian Jackson Subject: [Xen-devel] [PATCH 1/2] sg-report-flight: Do not try to print nonexistent FirstTip info X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The use of $info->{FirstTip}{flight} autovivifies $info->{FirstTip}. Defend $pinfo against the use of an autovivified empty hashref. Signed-off-by: Ian Jackson --- sg-report-flight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg-report-flight b/sg-report-flight index 7d2bc66..5b8f67a 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -586,7 +586,7 @@ sub print_pushgate_summary () { my $f = $info->{$flightkey}; my $count = $info->{$countkey}; bodyprintf "%-20s", $what; - if ($f) { + if ($f && %$f) { bodyprintf(" %6d %s %4d days", $f->{flight}, show_abs_time($f->{started}),