(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/stats_tree.c) |
| |
| 519 | | | stats_tree_manip_node(manip_node_mode mode, stats_tree *st, const char *name, |
| 520 | | | int parent_id, gboolean with_hash, gint value) |
| 521 | | | { |
| 522 | | | stat_node *node = NULL; |
| 523 | | | stat_node *parent = NULL; |
| 524 | | | |
| 525 | | | g_assert( parent_id >= 0 && parent_id < (int) st->parents->len );
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
74 | #define g_assert(expr) do { if G_LIKELY (expr) ; else \ |
75 | g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ |
76 | #expr); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
277 | #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
268 | #define _G_BOOLEAN_EXPR(expr) \ |
269 | __extension__ ({ \ |
270 | int _g_boolean_var_; \ |
271 | if (expr) \ |
272 | _g_boolean_var_ = 1; \ |
273 | else \ |
274 | _g_boolean_var_ = 0; \ |
275 | _g_boolean_var_; \ |
276 | }) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
| 526 | | | |
| 527 | | | parent = g_ptr_array_index(st->parents,parent_id);
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 528 | | | |
| 529 | | | if( parent->hash ) { |
| 530 | | | node = g_hash_table_lookup(parent->hash,name); |
| 531 | | | } else { |
| 532 | | | node = g_hash_table_lookup(st->names,name); |
| 533 | | | } |
| 534 | | | |
| 535 | | | if ( node == NULL ) |
| 536 | | | node = new_stat_node(st,name,parent_id,with_hash,with_hash); |
| 537 | | | |
| 538 | | | switch (mode) { |
| 539 | | | case MN_INCREASE: node->counter += value; break; |
| 540 | | | case MN_SET: node->counter = value; break; |
| 541 | | | } |
| 542 | | | |
| 543 | | | if (node) |
| 544 | | | return node->id; |
| 545 | | | else |
| 546 | | | return -1; |
Unreachable Computation
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 547 | | | } |
| |