mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-29 16:14:43 +00:00
Investigated and fixed up more compiler warnings. Now builds clean on gcc7.3
This commit is contained in:
10
src/ctcp.c
10
src/ctcp.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user