summaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorTomohiro Kusumi <tkusumi@tuxera.com>2017-06-24 01:07:56 +0300
committerJens Axboe <axboe@kernel.dk>2017-06-23 16:19:53 -0600
commit0f836f393f6b2535feb4175a8a1f6d2af3da95ad (patch)
treeacf29fd52b2f6f494daae7c2efcc40337bd31d5f /server.c
parent86fb8d809e36b5312171cfde8ce085a07202b9c1 (diff)
downloadfio-0f836f393f6b2535feb4175a8a1f6d2af3da95ad.tar.gz
fio-0f836f393f6b2535feb4175a8a1f6d2af3da95ad.tar.bz2
server: don't use void* for pointer arithmetic (gcc)
I think gcc extension should be avoided when it can be done by just changing a pointer type. Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'server.c')
-rw-r--r--server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/server.c b/server.c
index 8b36e383..2d17df63 100644
--- a/server.c
+++ b/server.c
@@ -252,9 +252,10 @@ static int fio_send_data(int sk, const void *p, unsigned int len)
return fio_sendv_data(sk, &iov, 1);
}
-static int fio_recv_data(int sk, void *p, unsigned int len, bool wait)
+static int fio_recv_data(int sk, void *buf, unsigned int len, bool wait)
{
int flags;
+ char *p = buf;
if (wait)
flags = MSG_WAITALL;
@@ -377,7 +378,7 @@ struct fio_net_cmd *fio_net_recv_cmd(int sk, bool wait)
break;
/* There's payload, get it */
- pdu = (void *) cmdret->payload + pdu_offset;
+ pdu = (char *) cmdret->payload + pdu_offset;
ret = fio_recv_data(sk, pdu, cmd.pdu_len, wait);
if (ret)
break;