Skip to content

Commit 7ffbedf

Browse files
Merge pull request #10852 from The-OpenROAD-Project-staging/coverity-make-uniq-hier-name
2 parents 42457f2 + 6a0442f commit 7ffbedf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/odb/src/db/dbInsertBuffer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,10 @@ std::string dbInsertBuffer::makeUniqueHierName(const dbModule* module,
539539
const char* suffix) const
540540
{
541541
// insertBuffer only punches scalar hierarchy ports, never bus ports.
542-
std::string scalar_base_name = replaceBracketsWithUnderscores(base_name);
543-
std::string name
544-
= (suffix == nullptr) ? scalar_base_name : scalar_base_name + suffix;
542+
std::string name = replaceBracketsWithUnderscores(base_name);
543+
if (suffix != nullptr) {
544+
name += suffix;
545+
}
545546
std::string full = block_->makeNewNetName(
546547
module, name.c_str(), dbNameUniquifyType::IF_NEEDED_WITH_UNDERSCORE);
547548
return std::string(block_->getBaseName(full.c_str()));

0 commit comments

Comments
 (0)