aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-12-15 18:55:03 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2014-12-23 15:40:01 +0100
commitfd19feefa421c7dcc374770d46d7bf729abcb05b (patch)
treefa646fa7951007974b1e1d9686bbf986d6d8e625 /src
parent078fe7aae6569c76e32412cb712dbe38537331ac (diff)
downloadstrongswan-fd19feefa421c7dcc374770d46d7bf729abcb05b.tar.bz2
strongswan-fd19feefa421c7dcc374770d46d7bf729abcb05b.tar.xz
bliss: Remove unnecessary cast to double
Coverity is still not happy when the result of an integer division is assigned to a double (without e.g. casting the result to an int first to indicate the intent). The shift should avoid this issue.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/plugins/bliss/bliss_huffman.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/bliss/bliss_huffman.c b/src/libstrongswan/plugins/bliss/bliss_huffman.c
index 5b7a7e0c8..647234fd8 100644
--- a/src/libstrongswan/plugins/bliss/bliss_huffman.c
+++ b/src/libstrongswan/plugins/bliss/bliss_huffman.c
@@ -276,7 +276,7 @@ int main(int argc, char *argv[])
/* Probability distribution for z2 */
dx = 1 << set->d;
k_top = 1 + set->B_inf / dx;
- x = (double)(dx/2) - 0.5;
+ x = (dx >> 1) - 0.5;
p_sum = 0;
for (k = 0; k < k_top; k++)