aboutsummaryrefslogtreecommitdiff
path: root/lib/tftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-04-16 23:43:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-04-16 23:43:04 +0200
commitc0111460b0689d74731cc56ff019cc869a0d16a8 (patch)
tree037a368cf8e5f50868320fa214d9915d7df4b924 /lib/tftp.c
parent93981bb9b5026f88ed4dec5d790bb7c84265210a (diff)
Curl_setup_transfer: no longer returns anything
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
Diffstat (limited to 'lib/tftp.c')
-rw-r--r--lib/tftp.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/tftp.c b/lib/tftp.c
index 564de4916..3c288b66e 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -797,10 +797,9 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event)
state->state = TFTP_STATE_FIN;
setpacketevent(&state->spacket, TFTP_EVENT_ERROR);
setpacketblock(&state->spacket, state->block);
- sbytes = sendto(state->sockfd, (void *)state->spacket.data,
- 4, SEND_4TH_ARG,
- (struct sockaddr *)&state->remote_addr,
- state->remote_addrlen);
+ (void)sendto(state->sockfd, (void *)state->spacket.data, 4, SEND_4TH_ARG,
+ (struct sockaddr *)&state->remote_addr,
+ state->remote_addrlen);
/* don't bother with the return code, but if the socket is still up we
* should be a good TFTP client and let the server know we're done */
state->state = TFTP_STATE_FIN;
@@ -1295,7 +1294,7 @@ static CURLcode tftp_easy_statemach(struct connectdata *conn)
}
/* Tell curl we're done */
- result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
+ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
return(result);
}
@@ -1329,7 +1328,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
*done = (bool)(state->state == TFTP_STATE_FIN);
if(*done)
/* Tell curl we're done */
- result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
+ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
}
else {
/* no timeouts to handle, check our socket */
@@ -1351,7 +1350,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done)
*done = (bool)(state->state == TFTP_STATE_FIN);
if(*done)
/* Tell curl we're done */
- result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
+ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL);
}
/* if rc == 0, then select() timed out */
}