Skip to contentSkip to conversation

TestSupport: Avoid use of uninitialised $dtbs warning

PATCH In review Ian Campbell 2 participants 2 messages Jul 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TestSupport: Avoid use of uninitialised $dtbs warning

If $xopts{dtbs} wasn't set then neither was $dtbs.

---
 Osstest/TestSupport.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Osstest/TestSupport.pm +1 -1
index 7c1bb2c..755a4ab 100644
@@ -2210,7 +2210,7 @@ sub setup_pxelinux_bootcfg ($$) {
 # Systems using BIOS are configured to use pxelinux
 sub setup_pxeboot_di_bios ($$$$$;%) {
     my ($ho,$kern,$initrd,$dicmd,$hocmd,%xopts) = @_;
-    my $dtbs = "fdtdir $xopts{dtbs}" if $xopts{dtbs};
+    my $dtbs = $xopts{dtbs} ? "fdtdir $xopts{dtbs}" : "";
     setup_pxelinux_bootcfg($ho, <<END);
     serial 0 $c{Baud}
 timeout 5
Signature · 1 line
2.1.4