diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-03-15 11:01:03 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-15 11:42:48 +0000 |
commit | 5af1e3a9582d6c1b5c4eb110840e74d0518e59dc (patch) | |
tree | 678be9d0fc087ee2ac31b0904e9f6ccaf6ba6b3d /ui/cli/tap-comparestat.c | |
parent | 813bc10e8fdf5df2dc876b6e1da90d9e1de70802 (diff) |
Fix -Wabsolute-value in TAP Compare stat (Found by Clang 3.5)
tap-comparestat.c:321:55: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
tap-comparestat.c:321:55: note: remove the call to 'abs' since unsigned values cannot be negative
tap-comparestat.c:347:56: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
tap-comparestat.c:347:56: note: remove the call to 'abs' since unsigned values cannot be negative
Change-Id: Ice950228d844373abcbd0cdc8ea05079b8b933d0
Reviewed-on: https://code.wireshark.org/review/676
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/cli/tap-comparestat.c')
-rw-r--r-- | ui/cli/tap-comparestat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c index 25bdfdfdc7..e0177a9a13 100644 --- a/ui/cli/tap-comparestat.c +++ b/ui/cli/tap-comparestat.c @@ -318,7 +318,7 @@ call_foreach_merge_settings(gpointer key _U_, gpointer value, gpointer arg) } if(fmod(fInfoTemp->zebra_time.nsecs, 2)){ /*first file*/ - cs->stop_packet_nr_first=cs->start_packet_nr_first+abs(cs->second_file_amount-(cs->start_packet_nr_second-cs->first_file_amount)); + cs->stop_packet_nr_first=cs->start_packet_nr_first+(cs->second_file_amount-(cs->start_packet_nr_second-cs->first_file_amount)); if(cs->stop_packet_nr_first>(tot_packet_amount-cs->second_file_amount)){ cs->stop_packet_nr_first=tot_packet_amount-cs->second_file_amount; } @@ -344,7 +344,7 @@ call_foreach_merge_settings(gpointer key _U_, gpointer value, gpointer arg) } } /* set second stop location */ - cs->stop_packet_nr_second=cs->start_packet_nr_second+abs(cs->stop_packet_nr_first-cs->start_packet_nr_first); + cs->stop_packet_nr_second=cs->start_packet_nr_second+(cs->stop_packet_nr_first-cs->start_packet_nr_first); if(cs->stop_packet_nr_second>tot_packet_amount){ cs->stop_packet_nr_second=tot_packet_amount; } |