aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-06-08 22:48:05 +0200
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2015-06-08 21:20:22 +0000
commit0a78e0bb485d129e7d68e2984e335bad5c3585fb (patch)
treed3df1a9d10860295dd9fb7fc1a278e11a1e0e4d8 /ui/cli
parenta7505812107346b3912df2fba6f8f805def97b9e (diff)
tap-macltestat.c: fix some V523 warnings reported by PVS-Studio
The 'then' statement is equivalent to the 'else' statement. Change-Id: I9e39afed3520cd4dffee52d5e57830817a8c4399 Reviewed-on: https://code.wireshark.org/review/8846 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'ui/cli')
-rw-r--r--ui/cli/tap-macltestat.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c
index c4f85b4334..96b495fcdb 100644
--- a/ui/cli/tap-macltestat.c
+++ b/ui/cli/tap-macltestat.c
@@ -226,6 +226,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Get reference to stat window instance */
mac_lte_stat_t *hs = (mac_lte_stat_t *)phs;
mac_lte_ep_t *tmp = NULL, *te = NULL;
+ int i;
/* Cast tap info struct */
const struct mac_lte_tap_info *si = (const struct mac_lte_tap_info *)phi;
@@ -349,7 +350,9 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
te->stats.UL_total_bytes += si->single_number_of_bytes;
}
else {
- te->stats.UL_total_bytes += si->single_number_of_bytes;
+ for (i = 0; i < 11; i++) {
+ te->stats.UL_total_bytes += si->bytes_for_lcid[i];
+ }
}
}
@@ -397,7 +400,9 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
te->stats.DL_total_bytes += si->single_number_of_bytes;
}
else {
- te->stats.DL_total_bytes += si->single_number_of_bytes;
+ for (i = 0; i < 11; i++) {
+ te->stats.DL_total_bytes += si->bytes_for_lcid[i];
+ }
}
}