Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix void conversions in knetfile.c #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions knetfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static off_t my_netread(int fd, void *buf, off_t len)
* one call. They have to be called repeatedly. */
while (rest) {
if (socket_wait(fd, 1) <= 0) break; // socket is not ready for reading
curr = netread(fd, buf + l, rest);
curr = netread(fd, (char*)buf + l, rest);
/* According to the glibc manual, section 13.2, a zero returned
* value indicates end-of-file (EOF), which should mean that
* read() will not return zero if EOF has not been met but data
Expand Down Expand Up @@ -517,7 +517,7 @@ off_t knet_read(knetFile *fp, void *buf, off_t len)
off_t rest = len, curr;
while (rest) {
do {
curr = read(fp->fd, buf + l, rest);
curr = read(fp->fd, (char*)buf + l, rest);
} while (curr < 0 && EINTR == errno);
if (curr < 0) return -1;
if (curr == 0) break;
Expand Down