Investigated and fixed up more compiler warnings. Now builds clean on gcc7.3

This commit is contained in:
MadCamel
2018-04-14 10:24:41 -04:00
parent cc752e9ccd
commit 2f910d1725
4 changed files with 20 additions and 9 deletions

View File

@@ -152,7 +152,7 @@ void dcc_pushfile(Client *client, off_t where)
sz = read(client->fileno,tempdata,sz);
if (sz < 1)
return;
write(client->sock,tempdata,sz);
sz = write(client->sock,tempdata,sz);
}
int dcc_freeslots(int uaccess)
@@ -235,7 +235,8 @@ void parse_dcc(Client *client)
{
s = read(client->sock,bigtemp,4096);
if (s > 0)
write(client->fileno,bigtemp,s);
if (write(client->fileno,bigtemp,s) == -1)
return;
}
while(s > 0);
@@ -244,7 +245,10 @@ void parse_dcc(Client *client)
where = oc = lseek(client->fileno,0,SEEK_CUR);
where = htonl(where);
write(client->sock,&where,4);
if (write(client->sock,&where,4) == -1)
return;
client->lasttime = now;
if (oc == client->fileend)