(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tcap-persistentdata.c) |
| |
| 857 | | | static struct tcaphash_endcall_t * |
| 858 | | | create_tcaphash_end(struct tcaphash_end_info_key_t *p_tcaphash_end_key, |
| 859 | | | struct tcaphash_context_t *p_tcaphash_context) |
| 860 | | | { |
| 861 | | | struct tcaphash_endcall_t *p_tcaphash_endcall1 = NULL; |
| 862 | | | struct tcaphash_endcall_t *p_tcaphash_endcall = NULL; |
| 863 | | | |
| 864 | | | p_tcaphash_endcall1 = (struct tcaphash_endcall_t *) |
| 865 | | | g_hash_table_lookup(tcaphash_end, p_tcaphash_end_key); |
| 866 | | | |
| 867 | | | if (p_tcaphash_endcall1) { |
| 868 | | | |
| 869 | | | |
| 870 | | | do { |
| 871 | | | if (!p_tcaphash_endcall1->next_endcall) { |
| 872 | | | p_tcaphash_endcall=append_tcaphash_endcall(p_tcaphash_endcall1, |
| 873 | | | p_tcaphash_context); |
| 874 | | | break; |
| 875 | | | } |
| 876 | | | p_tcaphash_endcall1 = p_tcaphash_endcall1->next_endcall; |
| 877 | | | } while (p_tcaphash_endcall1 != NULL ); |
Redundant Condition
p_tcaphash_endcall1 != (void *)0 always evaluates to true. This may be because: - There is a constant assignment to one or more of the variables involved.
- An earlier conditional statement has already ensured that p_tcaphash_endcall1 != (void *)0 cannot be false.
- A crashing bug occurs on every path where p_tcaphash_endcall1 != (void *)0 could have evaluated to false. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 878 | | | } else { |
| 879 | | | p_tcaphash_endcall = new_tcaphash_end(p_tcaphash_end_key, |
| 880 | | | p_tcaphash_context); |
| 881 | | | } |
| 882 | | | return p_tcaphash_endcall; |
| 883 | | | } |
| |