Skip to content

[SAST] Possible typo #2770

Description

@LM4O322

There was uncertainty about the correctness of the parameter for checking with the conditional else if construction.
1.

else if (ret == 0)

2.

else if (ret == 0)

The value of rlen is checked beforehand in the loop and ret is initialized based on the results of the check.
1.
if (rlen > 0) {

2.

if (rlen > 0) {

And when working out the conditional else if construction, ret is checked, which will later be overwritten without saving the value of the status code.
1.
ret = -2;

2.

ret = -2;

Perhaps the check was required for `rlen'?

Thank you for your time and consideration.


Found by Linux Verification Center with SVACE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions