summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibmemory')
-rw-r--r--src/vlibmemory/socket_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index 5587611d65a..51d35792244 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -453,7 +453,7 @@ vl_sock_api_send_fd_msg (int socket_fd, int fds[], int n_fds)
{
struct msghdr mh = { 0 };
struct iovec iov[1];
- char ctl[CMSG_SPACE (sizeof (int)) * n_fds];
+ char ctl[CMSG_SPACE (sizeof (int) * n_fds)];
struct cmsghdr *cmsg;
char *msg = "fdmsg";
int rv;
@@ -470,7 +470,7 @@ vl_sock_api_send_fd_msg (int socket_fd, int fds[], int n_fds)
cmsg->cmsg_len = CMSG_LEN (sizeof (int) * n_fds);
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;
- memcpy (CMSG_DATA (cmsg), fds, sizeof (int) * n_fds);
+ clib_memcpy (CMSG_DATA (cmsg), fds, sizeof (int) * n_fds);
rv = sendmsg (socket_fd, &mh, 0);
if (rv < 0)