Skip to content

Commit 097daeb

Browse files
committed
address comment related to Coverity to simplify
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
1 parent 5878d25 commit 097daeb

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
@@ -2478,10 +2478,8 @@ bool
24782478
LibertyPort::less(const LibertyPort *port1,
24792479
const LibertyPort *port2)
24802480
{
2481-
if (port1 == nullptr && port2 != nullptr)
2482-
return true;
24832481
if (port1 == nullptr || port2 == nullptr)
2484-
return false;
2482+
return port1 == nullptr && port2 != nullptr;
24852483
const std::string &name1 = port1->name();
24862484
const std::string &name2 = port2->name();
24872485
if (name1 == name2) {

0 commit comments

Comments
 (0)