]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
sg-report-flight: Do not try to print nonexistent FirstTip info
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 20 Apr 2017 12:55:18 +0000 (12:55 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 20 Apr 2017 12:55:26 +0000 (12:55 +0000)
The use of $info->{FirstTip}{flight} autovivifies $info->{FirstTip}.
Defend $pinfo against the use of an autovivified empty hashref.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
sg-report-flight

index 7d2bc66077e5b462e45fc4afec473dec05a8ad3a..5b8f67a3e73325ed33f49f1fffaa1820066e4417 100755 (executable)
@@ -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}),