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

[OSSTEST PATCH v2 32/41] adhoc-revtuple-generator: Fix an undef warning in a debug print



$parents might be undef here.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
New in v2.
---
 adhoc-revtuple-generator | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/adhoc-revtuple-generator b/adhoc-revtuple-generator
index c8d6f4ad..ec33305a 100755
--- a/adhoc-revtuple-generator
+++ b/adhoc-revtuple-generator
@@ -463,7 +463,7 @@ sub coalesce {
        $out->{$node}{Date}= $explode_date;
        my $parents= $graphs[$explode_i]{ $node[$explode_i] }{Parents};
        print DEBUG "#$explode_i $explode_isearliest".
-            " $explode_date  x".scalar(@$parents)."\n";
+            " $explode_date  x".($parents ? scalar(@$parents) : "-")."\n";
 
        foreach my $subparent (@$parents) {
            $node[$explode_i]= $subparent;
-- 
2.20.1




 


Rackspace

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