Skip to content

Commit 94af156

Browse files
committed
simplify one coverity fix issue
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
1 parent 0778035 commit 94af156

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

liberty/Liberty.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,10 +2477,8 @@ bool
24772477
LibertyPort::less(const LibertyPort *port1,
24782478
const LibertyPort *port2)
24792479
{
2480-
if (port1 == nullptr && port2 != nullptr)
2481-
return true;
24822480
if (port1 == nullptr || port2 == nullptr)
2483-
return false;
2481+
return port1 == nullptr && port2 != nullptr;
24842482
const std::string &name1 = port1->name();
24852483
const std::string &name2 = port2->name();
24862484
if (name1 == name2) {

0 commit comments

Comments
 (0)