Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
c11 safe string handling support
[vpp.git]
/
src
/
vppinfra
/
socket.c
diff --git
a/src/vppinfra/socket.c
b/src/vppinfra/socket.c
index
29b2a94
..
990d0f7
100644
(file)
--- a/
src/vppinfra/socket.c
+++ b/
src/vppinfra/socket.c
@@
-73,7
+73,7
@@
find_free_port (word sock)
{
struct sockaddr_in a;
{
struct sockaddr_in a;
-
memset (&a, 0, sizeof (a));
/* Warnings be gone */
+
clib_memset (&a, 0, sizeof (a));
/* Warnings be gone */
a.sin_family = PF_INET;
a.sin_addr.s_addr = INADDR_ANY;
a.sin_family = PF_INET;
a.sin_addr.s_addr = INADDR_ANY;
@@
-289,7
+289,7
@@
default_socket_sendmsg (clib_socket_t * s, void *msg, int msglen,
if (num_fds > 0)
{
struct cmsghdr *cmsg;
if (num_fds > 0)
{
struct cmsghdr *cmsg;
- memset (&ctl, 0, sizeof (ctl));
+
clib_
memset (&ctl, 0, sizeof (ctl));
mh.msg_control = ctl;
mh.msg_controllen = sizeof (ctl);
cmsg = CMSG_FIRSTHDR (&mh);
mh.msg_control = ctl;
mh.msg_controllen = sizeof (ctl);
cmsg = CMSG_FIRSTHDR (&mh);
@@
-328,7
+328,7
@@
default_socket_recvmsg (clib_socket_t * s, void *msg, int msglen,
mh.msg_control = ctl;
mh.msg_controllen = sizeof (ctl);
mh.msg_control = ctl;
mh.msg_controllen = sizeof (ctl);
- memset (ctl, 0, sizeof (ctl));
+
clib_
memset (ctl, 0, sizeof (ctl));
/* receive the incoming message */
size = recvmsg (s->fd, &mh, 0);
/* receive the incoming message */
size = recvmsg (s->fd, &mh, 0);
@@
-525,7
+525,7
@@
clib_socket_accept (clib_socket_t * server, clib_socket_t * client)
clib_error_t *err = 0;
socklen_t len = 0;
clib_error_t *err = 0;
socklen_t len = 0;
- memset (client, 0, sizeof (client[0]));
+
clib_
memset (client, 0, sizeof (client[0]));
/* Accept the new socket connection. */
client->fd = accept (server->fd, 0, 0);
/* Accept the new socket connection. */
client->fd = accept (server->fd, 0, 0);