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

[Xen-devel] [OSSTEST PATCH 4/6] mg-allocate: Tiny refactoring



Break out $shareix assignment from $4.  (We are going to want to put
some code just after this point which will want to do regexp matching,
which would trash $4.)

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 mg-allocate | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mg-allocate b/mg-allocate
index 9b66114..0317229 100755
--- a/mg-allocate
+++ b/mg-allocate
@@ -111,7 +111,8 @@ sub parse_1res ($) {
     my $restype= defined($2) ? $2 : 'host';
     $restype= 'share-host' if $restype eq 'S';
     my $resname= $3;
-    my $shareix= defined($4) ? $4+0 : '*';
+    my $shareix= $4;
+    $shareix= defined($shareix) ? $shareix+0 : '*';
     my $shareixcond = $shareix eq '*' ? '' : "AND shareix = $shareix";
 
     my @resnames;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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