Skip to content

Commit

Permalink
tests server sockfilt win32
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed May 13, 2024
1 parent 12b92a5 commit 389c5a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/server/sockfilt.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static ssize_t read_wincon(int fd, void *buf, size_t count)
success = ReadFile(handle, buf, curlx_uztoul(count), &rcount, NULL);
}
if(success) {
return rcount;
return (ssize_t)rcount;
}

errno = (int)GetLastError();
Expand Down Expand Up @@ -211,7 +211,7 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count)
success = WriteFile(handle, buf, curlx_uztoul(count), &wcount, NULL);
}
if(success) {
return wcount;
return (ssize_t)wcount;
}

errno = (int)GetLastError();
Expand Down Expand Up @@ -665,15 +665,15 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
}

/* allocate internal array for the internal data */
data = calloc(nfds, sizeof(struct select_ws_data));
data = calloc((size_t)nfds, sizeof(struct select_ws_data));
if(!data) {
CloseHandle(abort);
errno = ENOMEM;
return -1;
}

/* allocate internal array for the internal event handles */
handles = calloc(nfds + 1, sizeof(HANDLE));
handles = calloc((size_t)nfds + 1, sizeof(HANDLE));
if(!handles) {
CloseHandle(abort);
free(data);
Expand Down

0 comments on commit 389c5a5

Please sign in to comment.