(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/mate/mate_util.c) |
| |
| 1564 | | | static LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, const gchar* fmt, ...) { |
| 1565 | | | va_list list; |
| 1566 | | | gchar* desc; |
| 1567 | | | LoAL* ret = NULL; |
| 1568 | | | gchar* err; |
| 1569 | | | |
| 1570 | | | va_start( list, fmt );
x /home/sate/codesonar-3.7p0/csurf/csinclude/stdarg.h |
| |
43 | #hard_define va_start(x, n) (*(char**)&(x) = (char*)(&__builtin_va_alist)) |
| |
|
| 1571 | | | desc = g_strdup_vprintf(fmt, list); |
| 1572 | | | va_end( list ); |
| 1573 | | | |
| 1574 | | | |
| 1575 | | | err = g_strdup_printf("Error Loading LoAL from file: in %s at line: %i, %s",loal->name,linenum,desc); |
| 1576 | | | ret = new_loal(err); |
| 1577 | | | |
| 1578 | | | g_free(desc); |
| 1579 | | | g_free(err); |
| 1580 | | | |
| 1581 | | | if (fp) fclose(fp); |
| 1582 | | | if (loal) delete_loal(loal,TRUE,TRUE); |
Redundant Condition
loal 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 loal cannot be false.
- A crashing bug occurs on every path where loal could have evaluated to false. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 1583 | | | if (curr) delete_avpl(curr,TRUE); |
| 1584 | | | |
| 1585 | | | return ret; |
| 1586 | | | } |
| |