From a50210710ab6fd772e2762ed36602c15adfb49e1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 5 Sep 2011 20:46:09 +0200 Subject: fix bool variables checking and assignment --- 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 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); -- cgit v1.2.3