Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be4dbf5

Browse files
[lld][ELF] Remove redundant size check in nopInstrFill
We checked twice of size is equal to zero. This is not necessary and makes the code a little bit less readable. Reviewers: MaskRay, tmsri Pull Request: #180304
1 parent f72da50 commit be4dbf5

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

lld/ELF/OutputSections.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ static void nopInstrFill(Ctx &ctx, uint8_t *buf, size_t size) {
303303
if (size == 0)
304304
return;
305305
unsigned i = 0;
306-
if (size == 0)
307-
return;
308306
std::vector<std::vector<uint8_t>> nopFiller = *ctx.target->nopInstrs;
309307
unsigned num = size / nopFiller.back().size();
310308
for (unsigned c = 0; c < num; ++c) {

0 commit comments

Comments
 (0)