Added a cast to avoid a compiler warning.

This commit is contained in:
Jef Poskanzer 2013-11-07 08:20:04 -08:00
parent d2b9eb1a87
commit e35f2035d5
2 changed files with 2 additions and 1 deletions

View File

@ -755,7 +755,7 @@ int
iperf_set_send_state(struct iperf_test *test, signed char state)
{
test->state = state;
if (Nwrite(test->ctrl_sck, &state, sizeof(state), Ptcp) < 0) {
if (Nwrite(test->ctrl_sck, (char*) &state, sizeof(state), Ptcp) < 0) {
i_errno = IESENDMESSAGE;
return -1;
}

View File

@ -171,6 +171,7 @@ iperf_handle_message_client(struct iperf_test *test)
int rval;
int32_t err;
/*!!! Why is this read() and not Nread()? */
if ((rval = read(test->ctrl_sck, (char*) &test->state, sizeof(signed char))) <= 0) {
if (rval == 0) {
i_errno = IECTRLCLOSE;