diff options
author | Yang Tse <yangsita@gmail.com> | 2011-09-05 20:46:09 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-09-05 20:46:09 +0200 |
commit | a50210710ab6fd772e2762ed36602c15adfb49e1 (patch) | |
tree | 9ac720a0c9c0b628e1bfeba3b64c5a944e468117 /lib/tftp.c | |
parent | eb44ac013832aab80c3ed90292d7b4f25a8a4d75 (diff) | |
download | curl-a50210710ab6fd772e2762ed36602c15adfb49e1.tar.gz |
fix bool variables checking and assignment
Diffstat (limited to 'lib/tftp.c')
-rw-r--r-- | lib/tftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tftp.c b/lib/tftp.c index f915e76e0..ae1d5ebfe 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -206,7 +206,7 @@ static CURLcode tftp_set_timeouts(tftp_state_data_t *state) { time_t maxtime, timeout; long timeout_ms; - bool start = (bool)(state->state == TFTP_STATE_START); + bool start = (state->state == TFTP_STATE_START) ? TRUE : FALSE; time(&state->start_time); @@ -1334,7 +1334,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) result = tftp_state_machine(state, event); if(result != CURLE_OK) return(result); - *done = (bool)(state->state == TFTP_STATE_FIN); + *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE; if(*done) /* Tell curl we're done */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); @@ -1356,7 +1356,7 @@ static CURLcode tftp_multi_statemach(struct connectdata *conn, bool *done) result = tftp_state_machine(state, state->event); if(result != CURLE_OK) return(result); - *done = (bool)(state->state == TFTP_STATE_FIN); + *done = (state->state == TFTP_STATE_FIN) ? TRUE : FALSE; if(*done) /* Tell curl we're done */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); |