Skip to content

Commit 79dd566

Browse files
committed
est: fix coverity issue
Signed-off-by: Eder Monteiro <[email protected]>
1 parent 7f0e4a2 commit 79dd566

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/est/src/EstimateParasitics.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ odb::dbTechLayer* EstimateParasitics::getPinLayer(const Pin* pin)
841841
db_network_->staToDb(pin, iterm, bterm, moditerm);
842842

843843
odb::dbTechLayer* pin_layer = nullptr;
844+
odb::dbShape pin_shape;
844845
if (iterm) {
845846
int min_layer_idx = std::numeric_limits<int>::max();
846847
for (const auto& [layer, rect] : iterm->getGeometries()) {
@@ -849,13 +850,13 @@ odb::dbTechLayer* EstimateParasitics::getPinLayer(const Pin* pin)
849850
pin_layer = layer;
850851
}
851852
}
852-
} else if (bterm) {
853-
odb::dbShape pin_shape;
854-
bterm->getFirstPin(pin_shape);
853+
} else if (bterm && bterm->getFirstPin(pin_shape)) {
855854
pin_layer = pin_shape.getTechLayer();
856855
} else {
857-
logger_->error(
858-
EST, 164, "Pin {} has no iterm or bterm.", network_->pathName(pin));
856+
logger_->error(EST,
857+
164,
858+
"Pin {} has no placed iterm or bterm.",
859+
network_->pathName(pin));
859860
}
860861

861862
return pin_layer;

0 commit comments

Comments
 (0)