fio: replace malloc+memset with calloc
[fio.git] / engines / net.c
index c6cec5845aac48a3a8643b88c89b5f27fcdb8995..fec53d74175eedb5d4dd3be6e7a68ece50bb629f 100644 (file)
@@ -1370,9 +1370,7 @@ static int fio_netio_setup(struct thread_data *td)
        }
 
        if (!td->io_ops_data) {
-               nd = malloc(sizeof(*nd));
-
-               memset(nd, 0, sizeof(*nd));
+               nd = calloc(1, sizeof(*nd));
                nd->listenfd = -1;
                nd->pipes[0] = nd->pipes[1] = -1;
                td->io_ops_data = nd;