#1865 Logically dead code in tools_util.c
Closed: Fixed None Opened 7 years ago by jhrozek.

The check can never be reached:

539

cond_at_least: Condition "(child_pid = waitpid(pid, &status, 0)) > 0", taking true branch. Now the value of "child_pid" is at least 1.
540        while((child_pid = waitpid(pid, &status, 0)) > 0) {

at_least: At condition "child_pid == -1", the value of "child_pid" must be at least 1.

dead_error_condition: The condition "child_pid == -1" cannot be true.
541            if (child_pid == -1) {

CID 10018 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin: Execution cannot reach this statement "do {
int __debug_macro_ne...".
542                DEBUG(1, ("waitpid failed\n"));
543                ret = errno;
544                goto done;
545            }

The same problem is in sss_userdel.c too

Fields changed

coverity: 10018 => 10018, 10017

Fields changed

owner: somebody => mzidek
patch: 0 => 1

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.10.0
rhbz: => 0

Fields changed

milestone: SSSD 1.10.0 => SSSD 1.10 beta

resolution: => fixed
status: new => closed

Metadata Update from @jhrozek:
- Issue assigned to mzidek
- Issue set to the milestone: SSSD 1.10 beta

3 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/2907

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata