(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tcap-persistentdata.c) |
| |
| 828 | | | static struct tcaphash_contcall_t * |
| 829 | | | create_tcaphash_cont(struct tcaphash_cont_info_key_t *p_tcaphash_cont_key, |
| 830 | | | struct tcaphash_context_t *p_tcaphash_context) |
| 831 | | | { |
| 832 | | | struct tcaphash_contcall_t *p_tcaphash_contcall1 = NULL; |
| 833 | | | struct tcaphash_contcall_t *p_tcaphash_contcall = NULL; |
| 834 | | | |
| 835 | | | p_tcaphash_contcall1 = (struct tcaphash_contcall_t *) |
| 836 | | | g_hash_table_lookup(tcaphash_cont, p_tcaphash_cont_key); |
| 837 | | | |
| 838 | | | if (p_tcaphash_contcall1) { |
| 839 | | | |
| 840 | | | |
| 841 | | | do { |
| 842 | | | if (!p_tcaphash_contcall1->next_contcall) { |
| 843 | | | p_tcaphash_contcall=append_tcaphash_contcall(p_tcaphash_contcall1, |
| 844 | | | p_tcaphash_context); |
| 845 | | | break; |
| 846 | | | } |
| 847 | | | p_tcaphash_contcall1 = p_tcaphash_contcall1->next_contcall; |
| 848 | | | } while (p_tcaphash_contcall1 != NULL ); |
Redundant Condition
p_tcaphash_contcall1 != (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_contcall1 != (void *)0 cannot be false.
- A crashing bug occurs on every path where p_tcaphash_contcall1 != (void *)0 could have evaluated to false. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 849 | | | } else { |
| 850 | | | p_tcaphash_contcall = new_tcaphash_cont(p_tcaphash_cont_key, |
| 851 | | | p_tcaphash_context); |
| 852 | | | } |
| 853 | | | return p_tcaphash_contcall; |
| 854 | | | } |
| |