projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fio: replace malloc+memset with calloc
[fio.git]
/
engines
/
net.c
diff --git
a/engines/net.c
b/engines/net.c
index c6cec5845aac48a3a8643b88c89b5f27fcdb8995..fec53d74175eedb5d4dd3be6e7a68ece50bb629f 100644
(file)
--- a/
engines/net.c
+++ b/
engines/net.c
@@
-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;