Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at tcap-persistentdata.c:603

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

find_tcaphash_end

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tcap-persistentdata.c)expand/collapse
Show more  
 565  static struct tcaphash_endcall_t *
 566  find_tcaphash_end(struct tcaphash_end_info_key_t *p_tcaphash_end_key,
 567                    packet_info *pinfo, gboolean isEnd)
 568  {
 569    struct tcaphash_endcall_t *p_tcaphash_endcall = NULL;
 570    p_tcaphash_endcall = (struct tcaphash_endcall_t *)g_hash_table_lookup(tcaphash_end, p_tcaphash_end_key);
 571   
 572    if(p_tcaphash_endcall) {
 573      do {
 574        if ( p_tcaphash_endcall->context ) {
 575          if ( ( isEnd &&
 576                 (p_tcaphash_endcall->context->last_frame?pinfo->fd->num == p_tcaphash_endcall->context->last_frame:1)
 577                 )
 578               ||
 579               ( !isEnd &&
 580                 pinfo->fd->num >= p_tcaphash_endcall->context->first_frame &&
 581                 (p_tcaphash_endcall->context->last_frame?pinfo->fd->num <= p_tcaphash_endcall->context->last_frame:1)
 582                 )
 583               ) {
 584            /* We have a dialogue, with this key, opened before this request */
 585  #ifdef DEBUG_TCAPSRT 
 586            dbg(10,"E%d ", p_tcaphash_endcall->context->session_id);
 587  #endif
 588            return p_tcaphash_endcall;
 589            break;
 590          }
 591  #ifdef DEBUG_TCAPSRT 
 592            dbg(60,"[E%d] ", p_tcaphash_endcall->context->session_id);
 593  #endif
 594        }
 595        /* Break when list end is reached */
 596        if(p_tcaphash_endcall->next_endcall == NULL) {
 597  #ifdef DEBUG_TCAPSRT 
 598          dbg(23,"End of Elist ");
 599  #endif
 600          break;
 601        }
 602        p_tcaphash_endcall = p_tcaphash_endcall->next_endcall;
 603      } while (p_tcaphash_endcall != NULL) ;
 604    } else {
 605  #ifdef DEBUG_TCAPSRT 
 606      dbg(23,"Not in Ehash ");
 607  #endif
 608    }
 609    return NULL;
 610  }
Show more  




Change Warning 1231.29441 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: