diff options
author | Dave Barach <dave@barachs.net> | 2018-10-17 10:38:51 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-23 13:06:46 +0000 |
commit | b7b929931a07fbb27b43d5cd105f366c3e29807e (patch) | |
tree | 438681c89738802dbb5d339715b96ea2c31bafb4 /src/vnet/devices/virtio/vhost_user.c | |
parent | b9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff) |
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user.c')
-rw-r--r-- | src/vnet/devices/virtio/vhost_user.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c index 1342030a651..9725a91027d 100644 --- a/src/vnet/devices/virtio/vhost_user.c +++ b/src/vnet/devices/virtio/vhost_user.c @@ -307,7 +307,7 @@ static_always_inline void vhost_user_vring_init (vhost_user_intf_t * vui, u32 qid) { vhost_user_vring_t *vring = &vui->vrings[qid]; - memset (vring, 0, sizeof (*vring)); + clib_memset (vring, 0, sizeof (*vring)); vring->kickfd_idx = ~0; vring->callfd_idx = ~0; vring->errfd = -1; @@ -394,8 +394,8 @@ vhost_user_socket_read (clib_file_t * uf) char control[CMSG_SPACE (VHOST_MEMORY_MAX_NREGIONS * sizeof (int))]; - memset (&mh, 0, sizeof (mh)); - memset (control, 0, sizeof (control)); + clib_memset (&mh, 0, sizeof (mh)); + clib_memset (control, 0, sizeof (control)); for (i = 0; i < VHOST_MEMORY_MAX_NREGIONS; i++) fds[i] = -1; @@ -1419,7 +1419,7 @@ vhost_user_vui_init (vnet_main_t * vnm, { vui->vring_locks[q] = clib_mem_alloc_aligned (CLIB_CACHE_LINE_BYTES, CLIB_CACHE_LINE_BYTES); - memset ((void *) vui->vring_locks[q], 0, CLIB_CACHE_LINE_BYTES); + clib_memset ((void *) vui->vring_locks[q], 0, CLIB_CACHE_LINE_BYTES); } vec_validate (vui->per_cpu_tx_qid, |