engines/io_uring_cmd: make trims async
[fio.git] / client.c
index 51496c770248a2d67466a97ad7529d8d4ec68e82..7cd2ba66e1548cb9c84cbc43958c478d752386d8 100644 (file)
--- a/client.c
+++ b/client.c
@@ -369,8 +369,7 @@ static struct fio_client *get_new_client(void)
 {
        struct fio_client *client;
 
-       client = malloc(sizeof(*client));
-       memset(client, 0, sizeof(*client));
+       client = calloc(1, sizeof(*client));
 
        INIT_FLIST_HEAD(&client->list);
        INIT_FLIST_HEAD(&client->hash_list);
@@ -793,8 +792,7 @@ static int __fio_client_send_remote_ini(struct fio_client *client,
        dprint(FD_NET, "send remote ini %s to %s\n", filename, client->hostname);
 
        p_size = sizeof(*pdu) + strlen(filename) + 1;
-       pdu = malloc(p_size);
-       memset(pdu, 0, p_size);
+       pdu = calloc(1, p_size);
        pdu->name_len = strlen(filename);
        strcpy((char *) pdu->file, filename);
        pdu->client_type = cpu_to_le16((uint16_t) client->type);