src/lib: remove redundant ternary operators

Closes #15435
This commit is contained in:
Daniel Stenberg 2024-10-28 17:26:19 +01:00
parent 080973dcdb
commit cd2b45201a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
32 changed files with 68 additions and 75 deletions

View file

@ -205,7 +205,7 @@ static CURLcode tftp_set_timeouts(struct tftp_state_data *state)
{
time_t maxtime, timeout;
timediff_t timeout_ms;
bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE;
bool start = (state->state == TFTP_STATE_START);
/* Compute drop-dead time */
timeout_ms = Curl_timeleft(state->data, NULL, start);
@ -1232,7 +1232,7 @@ static CURLcode tftp_multi_statemach(struct Curl_easy *data, bool *done)
result = tftp_state_machine(state, event);
if(result)
return result;
*done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE;
*done = (state->state == TFTP_STATE_FIN);
if(*done)
/* Tell curl we are done */
Curl_xfer_setup_nop(data);
@ -1255,7 +1255,7 @@ static CURLcode tftp_multi_statemach(struct Curl_easy *data, bool *done)
result = tftp_state_machine(state, state->event);
if(result)
return result;
*done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE;
*done = (state->state == TFTP_STATE_FIN);
if(*done)
/* Tell curl we are done */
Curl_xfer_setup_nop(data);