From e35f2035d557a6e9429b76b3d3fa87566936aa5f Mon Sep 17 00:00:00 2001 From: Jef Poskanzer Date: Thu, 7 Nov 2013 08:20:04 -0800 Subject: [PATCH] Added a cast to avoid a compiler warning. --- src/iperf_api.c | 2 +- src/iperf_client_api.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iperf_api.c b/src/iperf_api.c index 62cb716..292648f 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -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; } diff --git a/src/iperf_client_api.c b/src/iperf_client_api.c index 14e1f39..66ec048 100644 --- a/src/iperf_client_api.c +++ b/src/iperf_client_api.c @@ -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;