[PATCH] winetest: add integer bytes_recv variable (Coverity)
Marcus Meissner
marcus at jet.franken.de
Tue Jul 22 01:28:49 CDT 2014
Coverity gets confused by the unsigned return, make it a bit
easier.
1225832 Logically dead code
---
programs/winetest/send.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/winetest/send.c b/programs/winetest/send.c
index d04b6e9..36e9adb 100644
--- a/programs/winetest/send.c
+++ b/programs/winetest/send.c
@@ -129,7 +129,7 @@ send_file_direct (const char *name)
DWORD bytes_read, filesize;
size_t total, count;
char *str;
- int ret;
+ int bytes_recvd, ret;
/* RFC 2616 */
static const char head[] = "POST " URL_PATH " HTTP/1.0\r\n"
@@ -201,14 +201,14 @@ send_file_direct (const char *name)
report (R_DELTA, 0, "Network transfer: Done");
total = 0;
- while ((bytes_read = recv (s, buffer+total, BUFLEN-total, 0))) {
- if ((signed)bytes_read == SOCKET_ERROR) {
+ while ((bytes_recvd = recv (s, buffer+total, BUFLEN-total, 0))) {
+ if (bytes_recvd == SOCKET_ERROR) {
if (errno == EINTR) continue;
report (R_WARNING, "Error receiving reply: %d, %d",
errno, WSAGetLastError ());
goto abort1;
}
- total += bytes_read;
+ total += bytes_recvd;
if (total == BUFLEN) {
report (R_WARNING, "Buffer overflow");
goto abort1;
--
1.8.4.5
More information about the wine-patches
mailing list