Skip to content

Logically dead code in tools_util.c #2907

@sssd-bot

Description

@sssd-bot

Cloned from Pagure issue: https://pagure.io/SSSD/sssd/issue/1865

  • Created at 2013-04-03 10:49:07 by jhrozek
  • Closed as Fixed
  • Assigned to mzidek

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            }

Comments


Comment from jhrozek at 2013-04-03 10:50:42

The same problem is in sss_userdel.c too


Comment from jhrozek at 2013-04-03 10:51:15

Fields changed

coverity: 10018 => 10018, 10017


Comment from mzidek at 2013-04-03 18:03:23

Fields changed

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


Comment from dpal at 2013-04-04 15:46:18

Fields changed

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


Comment from dpal at 2013-04-04 15:52:10

Fields changed

milestone: SSSD 1.10.0 => SSSD 1.10 beta


Comment from jhrozek at 2013-04-05 17:29:21

resolution: => fixed
status: new => closed


Comment from jhrozek at 2017-02-24 14:50:53

Metadata Update from @jhrozek:

  • Issue assigned to mzidek
  • Issue set to the milestone: SSSD 1.10 beta

Metadata

Metadata

Assignees

Labels

Closed: FixedIssue was closed as fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions