address comment related to Coverity to simplify

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
This commit is contained in:
dsengupta0628 2026-04-10 18:59:42 +00:00
parent 5878d2594d
commit 097daeb3c5
1 changed files with 1 additions and 3 deletions

View File

@ -2478,10 +2478,8 @@ bool
LibertyPort::less(const LibertyPort *port1,
const LibertyPort *port2)
{
if (port1 == nullptr && port2 != nullptr)
return true;
if (port1 == nullptr || port2 == nullptr)
return false;
return port1 == nullptr && port2 != nullptr;
const std::string &name1 = port1->name();
const std::string &name2 = port2->name();
if (name1 == name2) {