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.jack...@eu.citrix.com> --- 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@lists.xen.org https://lists.xen.org/xen-devel