From 66de563482c0fd4324e1eae19809d2499e3c4fa8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 10 Mar 2017 14:28:37 +0100 Subject: Improve code readbility ... by removing the else branch after a return, break or continue. Closes #1310 --- lib/tftp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/tftp.c') diff --git a/lib/tftp.c b/lib/tftp.c index f2f834775..098b1bb9a 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -359,7 +359,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state, failf(data, "invalid blocksize value in OACK packet"); return CURLE_TFTP_ILLEGAL; } - else if(blksize > TFTP_BLKSIZE_MAX) { + if(blksize > TFTP_BLKSIZE_MAX) { failf(data, "%s (%d)", "blksize is larger than max supported", TFTP_BLKSIZE_MAX); return CURLE_TFTP_ILLEGAL; @@ -1189,7 +1189,7 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event) state->state = TFTP_STATE_FIN; return 0; } - else if(current > state->rx_time+state->retry_time) { + if(current > state->rx_time+state->retry_time) { if(event) *event = TFTP_EVENT_TIMEOUT; time(&state->rx_time); /* update even though we received nothing */ @@ -1223,7 +1223,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) failf(data, "TFTP response timeout"); return CURLE_OPERATION_TIMEDOUT; } - else if(event != TFTP_EVENT_NONE) { + if(event != TFTP_EVENT_NONE) { result = tftp_state_machine(state, event); if(result) return result; -- cgit v1.2.3