s3: Fix a type-punned warning
authorVolker Lendecke <vl@samba.org>
Mon, 21 Jun 2010 06:38:51 +0000 (08:38 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 21 Jun 2010 13:03:58 +0000 (15:03 +0200)
source3/lib/util_tsock.c

index 758885740438adecf5c853ebfa973b8061b2cf35..1cb88c67bd03ab515f03c3919522e786498d36f6 100644 (file)
@@ -51,7 +51,7 @@ struct tevent_req *tstream_read_packet_send(TALLOC_CTX *mem_ctx,
        if (tevent_req_nomem(state->buf, req)) {
                return tevent_req_post(req, ev);
        }
-       state->iov.iov_base = state->buf;
+       state->iov.iov_base = (void *)state->buf;
        state->iov.iov_len = initial;
 
        state->ev = ev;
@@ -114,7 +114,7 @@ static void tstream_read_packet_done(struct tevent_req *subreq)
        }
        state->buf = tmp;
 
-       state->iov.iov_base = state->buf + total;
+       state->iov.iov_base = (void *)(state->buf + total);
        state->iov.iov_len = more;
 
        subreq = tstream_readv_send(state, state->ev, state->stream,