]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
mg-allocate: Tiny refactoring
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 4 Oct 2016 12:20:12 +0000 (13:20 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 4 Oct 2016 12:23:47 +0000 (13:23 +0100)
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@eu.citrix.com>
mg-allocate

index 9b661140dcb8ef471fb07e7eff1b3a79590b50ee..0317229cfa112a8347db96c9ffd261b2bb777131 100755 (executable)
@@ -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;