Skip to contentSkip to conversation

ts-xen-*: Avoid use of uninitialised $r{"enable_xsm"}

PATCH In review Ian Campbell 2 participants 2 messages Apr 2, 2015 – Apr 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ts-xen-*: Avoid use of uninitialised $r{"enable_xsm"}

Use of uninitialized value $r{"enable_xsm"} in pattern match (m//) at ./ts-xen-install line 49.

---
 ts-xen-build   | 2 +-
 ts-xen-install | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
ts-xen-build +1 -1
index e757f68..a530731 100755
@@ -28,7 +28,7 @@ selectbuildhost(\@ARGV);
 # remaining arguments are passed as targets to "make"
 builddirsprops();
 
-my $enable_xsm = $r{enable_xsm} =~ m/true/ ? 1 : 0;
+my $enable_xsm = $r{enable_xsm}//'' =~ m/true/ ? 1 : 0;
     
 sub checkout () {
     prepbuilddirs();
ts-xen-install +1 -1
index b3f4387..6995046 100755
@@ -46,7 +46,7 @@ if (@ARGV and $ARGV[0] eq '--check') {
 
 our $ho;
 
-my $enable_xsm = $r{enable_xsm} =~ m/true/ ? 1 : 0;
+my $enable_xsm = $r{enable_xsm}//'' =~ m/true/ ? 1 : 0;
 
 my %distpath;
 
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw

Ian Campbell writes ("[PATCH OSSTEST] ts-xen-*: Avoid use of uninitialised $r{"enable_xsm"}"):

Quoted 1 line

Use of uninitialized value $r{"enable_xsm"} in pattern match (m//) at ./ts-xen-install line 49.