From 62c25abaa3e93be5815172d391295a6ab0390122 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Sat, 12 Dec 2020 23:32:12 +0100 Subject: vppinfra: simpler and faster pool_foreach - reduces number of instructions generated 4 times compared to old code - adds pool_foreach2 which is more friendly to clang-format Type: improvement Change-Id: I51e9c7fb09655c60d883987dadf5b2666c12b3f7 Signed-off-by: Damjan Marion --- src/vnet/devices/virtio/vhost_user.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vnet/devices/virtio/vhost_user.c') diff --git a/src/vnet/devices/virtio/vhost_user.c b/src/vnet/devices/virtio/vhost_user.c index d8c79ea17aa..f7cecef4d19 100644 --- a/src/vnet/devices/virtio/vhost_user.c +++ b/src/vnet/devices/virtio/vhost_user.c @@ -1230,6 +1230,7 @@ vhost_user_process (vlib_main_t * vm, /* try to connect */ strncpy (sun.sun_path, (char *) vui->sock_filename, sizeof (sun.sun_path) - 1); + sun.sun_path[sizeof (sun.sun_path) - 1] = 0; /* Avoid hanging VPP if the other end does not accept */ if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0) -- cgit 1.2.3-korg