aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2017-05-22 01:16:38 +0200
committerLuca Deri <deri@ntop.org>2017-05-22 01:16:38 +0200
commitb89a2dce6f9a750219babe42276480396a78546b (patch)
treeae0ad31740f79aa12c8b81ac3398d132ca12595a /example/ndpiReader.c
parent97a57ac68d2b2a1007df57f04582197b0f070f96 (diff)
Removed warning
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 45f2d89c6..20b423166 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1627,8 +1627,9 @@ static void printResults(u_int64_t tot_usec) {
u_int64_t total_src_addr = getTopStats(&topSrcStats, srcStats, cumulative_stats.ip_packet_count);
u_int64_t total_dst_addr = getTopStats(&topDstStats, dstStats, cumulative_stats.ip_packet_count);
- if(file_first_time && (stats_fp = fopen(_statsFilePath,"w")) == NULL ||
- !file_first_time && (stats_fp = fopen(_statsFilePath,"a")) == NULL) {
+ if((file_first_time && ((stats_fp = fopen(_statsFilePath,"w")) == NULL))
+ ||
+ (!file_first_time && (stats_fp = fopen(_statsFilePath,"a")) == NULL)) {
printf("Error creating file %s\n", _statsFilePath);
stats_flag = 0;
}