| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 2/2] cs-adjust-flight: runvar-perlop: Do not report non-changes
 With -v, runvar-perlop would unconditionally print a message about the
changed variable.  Instead, only call runvar_set if the value is to
change.
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 cs-adjust-flight |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cs-adjust-flight b/cs-adjust-flight
index 7ec17e3..d6cab1a 100755
--- a/cs-adjust-flight
+++ b/cs-adjust-flight
@@ -268,7 +268,8 @@ sub change__runvar_perlop {
         my ($job, $name, $varrow) = @_;
        my $oldval = $varrow->{val};
        my $newval = perlop_value($job, $name, $op, $oldval);
-        runvar_set($job, $name, $newval, " (modified from \`$oldval')");
+        runvar_set($job, $name, $newval, " (modified from \`$oldval')")
+           if $newval ne $oldval;
     }, 'IGNORE');
 }
 
-- 
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |