(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/proto.c) |
| |
| 662 | | | prefix_equal (gconstpointer ap,gconstpointer bp) { |
| 663 | | | const gchar* a = ap; |
| 664 | | | const gchar* b = bp; |
| 665 | | | |
| 666 | | | do { |
| 667 | | | gchar ac = *a++; |
| 668 | | | gchar bc = *b++; |
| 669 | | | |
| 670 | | | if ((ac == '.' || ac == '\0') && (bc == '.' || bc == '\0')) return TRUE; |
| 671 | | | |
| 672 | | | if ( (ac == '.' || ac == '\0') && ! (bc == '.' || bc == '\0') ) return FALSE; |
Redundant Condition
bc == 46 always evaluates to false. 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 bc == 46 cannot be true.
- A crashing bug occurs on every path where bc == 46 could have evaluated to true. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 673 | | | if ( (bc == '.' || bc == '\0') && ! (ac == '.' || ac == '\0') ) return FALSE; |
| 674 | | | |
| 675 | | | if (ac != bc) return FALSE; |
| 676 | | | } while(1); |
| 677 | | | |
| 678 | | | return FALSE; |
| 679 | | | } |
| |