llext: fix minor Coverity issue #434586
The check combination of "is zero" and then "less than zero" leaves open the theoretical possibility of a positive return value, which would continue on with an uinitialized 'rela'. Checking for "not zero" has the same effect and covers all situations. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
parent
141f8b3858
commit
56fd854423
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ static void llext_link_plt(struct llext_loader *ldr, struct llext *ext, elf_shdr
|
|||
ret = llext_read(ldr, &rela, sizeof(rela));
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
if (ret != 0) {
|
||||
LOG_ERR("PLT: failed to read RELA #%u, trying to continue", i);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue