changes to silent compiler warnings with 64bit systems.
This commit is contained in:
parent
21dd9a8021
commit
038fff6c9f
36
lib/tftp.c
36
lib/tftp.c
@ -657,7 +657,6 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
|
|||||||
static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
|
static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
|
||||||
{
|
{
|
||||||
struct SessionHandle *data = state->conn->data;
|
struct SessionHandle *data = state->conn->data;
|
||||||
ssize_t sbytes;
|
|
||||||
int rblock;
|
int rblock;
|
||||||
int readcount;
|
int readcount;
|
||||||
CURLcode res = CURLE_OK;
|
CURLcode res = CURLE_OK;
|
||||||
@ -681,13 +680,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
|
|||||||
res = CURLE_SEND_ERROR;
|
res = CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Re-send the data packet */
|
/* Re-send the data packet and check all sbytes were sent */
|
||||||
sbytes = sendto(state->sockfd, (void *)&state->spacket,
|
if(sendto(state->sockfd, (void *)&state->spacket,
|
||||||
4+state->sbytes, SEND_4TH_ARG,
|
4+state->sbytes, SEND_4TH_ARG,
|
||||||
(struct sockaddr *)&state->remote_addr,
|
(struct sockaddr *)&state->remote_addr,
|
||||||
state->remote_addrlen);
|
state->remote_addrlen) < 0) {
|
||||||
/* Check all sbytes were sent */
|
|
||||||
if(sbytes<0) {
|
|
||||||
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
|
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
|
||||||
res = CURLE_SEND_ERROR;
|
res = CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
@ -710,12 +707,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
|
|||||||
state->sbytes = readcount;
|
state->sbytes = readcount;
|
||||||
if(res)
|
if(res)
|
||||||
return res;
|
return res;
|
||||||
sbytes = sendto(state->sockfd, (void *)state->spacket.data,
|
/* Send the data packet and check all sbytes were sent */
|
||||||
4+state->sbytes, SEND_4TH_ARG,
|
if(sendto(state->sockfd, (void *)state->spacket.data,
|
||||||
(struct sockaddr *)&state->remote_addr,
|
4+state->sbytes, SEND_4TH_ARG,
|
||||||
state->remote_addrlen);
|
(struct sockaddr *)&state->remote_addr,
|
||||||
/* Check all sbytes were sent */
|
state->remote_addrlen) < 0) {
|
||||||
if(sbytes<0) {
|
|
||||||
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
|
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
@ -735,13 +731,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
|
|||||||
state->state = TFTP_STATE_FIN;
|
state->state = TFTP_STATE_FIN;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Re-send the data packet */
|
/* Re-send the data packet and check all sbytes were sent */
|
||||||
sbytes = sendto(state->sockfd, (void *)state->spacket.data,
|
if(sendto(state->sockfd, (void *)state->spacket.data,
|
||||||
4+state->sbytes, SEND_4TH_ARG,
|
4+state->sbytes, SEND_4TH_ARG,
|
||||||
(struct sockaddr *)&state->remote_addr,
|
(struct sockaddr *)&state->remote_addr,
|
||||||
state->remote_addrlen);
|
state->remote_addrlen) < 0) {
|
||||||
/* Check all sbytes were sent */
|
|
||||||
if(sbytes<0) {
|
|
||||||
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
|
failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO));
|
||||||
return CURLE_SEND_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user