#1855 ding-libs.dhash: don't use backward jumps
Closed: Fixed None Opened 11 years ago by okos.

Scope of the function hash_iter_next uses backward jumps and is hard to read, it should be rewritten.
By fixing this, also coverity issue CID 10058 should be fixed.

dhash/dhash.c:static hash_entry_t *hash_iter_next

 726 state_3a:
 727    if (iter->p == NULL) goto state_3b;
 728    entry = &iter->p->entry;
 729    iter->p = iter->p->next;
 730    return entry;
 731 state_3b:
 732    iter->j++;
 733    goto state_2;
 734
 735    /* Should never reach here */

CID 10058 (#1 of 1): Structurally dead code (UNREACHABLE)unreachable: This code cannot be reached: "fprintf(stderr, "ERROR hash...".
 736    fprintf(stderr, "ERROR hash_iter_next reached invalid state\n");
 737    return NULL;
 738}

Fields changed

coverity: => 10058
owner: somebody => okos
status: new => assigned

Fields changed

coverity: => 10058
owner: somebody => okos
status: new => assigned

Fields changed

coverity: => 10058
owner: somebody => okos
status: new => assigned

Fields changed

patch: 0 => 1

Fields changed

patch: 0 => 1

Fields changed

patch: 0 => 1

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1
rhbz: => 0

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1
rhbz: => 0

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1
rhbz: => 0

resolution: => fixed
status: assigned => closed
_comment0: * master: f8a80797c298f4ebe2dc2ebcb2327fa1f3a38905 => 1365609593877641

resolution: => fixed
status: assigned => closed
_comment0: * master: f8a80797c298f4ebe2dc2ebcb2327fa1f3a38905 => 1365609593877641

resolution: => fixed
status: assigned => closed
_comment0: * master: f8a80797c298f4ebe2dc2ebcb2327fa1f3a38905 => 1365609593877641

Metadata Update from @okos:
- Issue assigned to okos
- Issue set to the milestone: Tools 1.0.1

7 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/2897

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