summaryrefslogtreecommitdiff
path: root/lib/tftp.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-05 20:46:09 +0200
committerYang Tse <yangsita@gmail.com>2011-09-05 20:46:09 +0200
commita50210710ab6fd772e2762ed36602c15adfb49e1 (patch)
tree9ac720a0c9c0b628e1bfeba3b64c5a944e468117 /lib/tftp.c
parenteb44ac013832aab80c3ed90292d7b4f25a8a4d75 (diff)
downloadcurl-a50210710ab6fd772e2762ed36602c15adfb49e1.tar.gz
fix bool variables checking and assignment
Diffstat (limited to 'lib/tftp.c')
-rw-r--r--lib/tftp.c6
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);