(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/wsp_stat.c) |
| |
| 205 | | | wspstat_draw(void *psp) |
| 206 | | | { |
| 207 | | | wspstat_t *sp=psp; |
| 208 | | | guint32 i; |
| 209 | | | char str[256]; |
| 210 | | | guint index; |
| 211 | | | |
| 212 | | | for(i=1;i<=sp->num_pdus ; i++) |
| 213 | | | { |
| 214 | | | g_snprintf(str, sizeof(str), "%9d", sp->pdu_stats[i ].packets); |
| 215 | | | gtk_label_set_text( GTK_LABEL(sp->pdu_stats[i].widget), str);
x /usr/include/gtk-2.0/gtk/gtklabel.h |
| |
42 | #define GTK_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LABEL, GtkLabel)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtklabel.h |
| |
41 | #define GTK_TYPE_LABEL (gtk_label_get_type ()) |
| |
|
| 216 | | | } |
| 217 | | | |
| 218 | | | index=sp->index; |
| 219 | | | g_hash_table_foreach( sp->hash, (GHFunc) wsp_draw_statuscode, NULL ); |
| 220 | | | if (index != sp->index){ |
Redundant Condition
index != sp->index 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 index != sp->index cannot be true.
- A crashing bug occurs on every path where index != sp->index could have evaluated to true. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 221 | | | |
| 222 | | | |
| 223 | | | gtk_table_resize ( GTK_TABLE(sp->table_status_code), sp->index % 2 , 4);
x /usr/include/gtk-2.0/gtk/gtktable.h |
| |
41 | #define GTK_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TABLE, GtkTable)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtktable.h |
| |
40 | #define GTK_TYPE_TABLE (gtk_table_get_type ()) |
| |
|
| 224 | | | } |
| 225 | | | |
| 226 | | | } |
| |