From b743623ff4677d9ad5006de5d272dc1cc7b9a9f0 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 13:37:23 +0800 Subject: [PATCH] coverity 83683 test ping more uint64_t needed Signed-off-by: Andy Green --- test-server/test-ping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-server/test-ping.c b/test-server/test-ping.c index 4035a6c2..c04f2862 100644 --- a/test-server/test-ping.c +++ b/test-server/test-ping.c @@ -110,7 +110,7 @@ callback_lws_mirror(struct libwebsocket_context * this, struct timeval tv; unsigned char *p; int shift; - unsigned long l; + uint64_t l; unsigned long iv; int n; int match = 0; @@ -161,7 +161,7 @@ callback_lws_mirror(struct libwebsocket_context * this, l = 0; while (shift >= 0) { - l |= (*p++) << shift; + l |= ((uint64_t)*p++) << shift; shift -= 8; }