diff mbox series

[OSSTEST,18/82] host allocation: Remove some unnecessary definedness tests

Message ID 20201007180024.7932-19-iwj@xenproject.org (mailing list archive)
State New, archived
Headers show
Series Reuse test hosts | expand

Commit Message

Ian Jackson Oct. 7, 2020, 5:59 p.m. UTC
From: Ian Jackson <ian.jackson@eu.citrix.com>

$set_info->() already checkes for undef, and returns immediately in
that case.  So there is no point checking at the call site.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Executive.pm | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index f17e7b70..5d71d08c 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -849,15 +849,8 @@  sub alloc_resources {
                 $set_info->('sub-priority',$ENV{OSSTEST_RESOURCE_SUBPRIORITY});
                 $set_info->('preinfo',     $ENV{OSSTEST_RESOURCE_PREINFO});
 		$set_info->('feature-noalloc', 1);
-
-                if (defined $waitstart) {
-                    $set_info->('wait-start',$waitstart);
-                }
-
-                my $adjust= $xparams{WaitStartAdjust};
-                if (defined $adjust) {
-                    $set_info->('wait-start-adjust',$adjust);
-                }
+		$set_info->('wait-start',$waitstart);
+		$set_info->('wait-start-adjust',$xparams{WaitStartAdjust});
 
                 my $jobinfo= $xparams{JobInfo};
                 if (!defined $jobinfo and defined $flight and defined $job) {