diff options
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 6c3dfeee8..3f030265c 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -913,7 +913,7 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept struct ndpi_flow_info *flow = *(struct ndpi_flow_info **) node; u_int16_t thread_id = *((u_int16_t *) user_data); - if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */ + if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */ if((!flow->detection_completed) && flow->ndpi_flow) flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].workflow->ndpi_struct, flow->ndpi_flow, enable_protocol_guess); @@ -1015,7 +1015,6 @@ void freeIpTree(addr_node *root) { freeIpTree(root->left); freeIpTree(root->right); free(root); - root = NULL; } /* *********************************************** */ @@ -2901,7 +2900,7 @@ float getAverage(struct json_object *jObj_stat, char *field){ float average; float sum = 0; int r; - int j; + int j = 0; if((r = strcmp(field, "top.scanner.stats")) == 0) { for(j=0; j<json_object_array_length(jObj_stat); j++) { |