summaryrefslogtreecommitdiffstats
path: root/src/vlibapi
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibapi')
-rw-r--r--src/vlibapi/vat_helper_macros.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/vlibapi/vat_helper_macros.h b/src/vlibapi/vat_helper_macros.h
index 5e7f1083947..fd2e563512f 100644
--- a/src/vlibapi/vat_helper_macros.h
+++ b/src/vlibapi/vat_helper_macros.h
@@ -77,12 +77,14 @@ do { \
socket_client_main_t *scm = &vam->socket_client_main; \
if (scm->socket_enable) \
{ \
- msgbuf_t msgbuf; \
- \
- msgbuf.q = 0; \
- msgbuf.gc_mark_timestamp = 0; \
- msgbuf.data_len = ntohl(scm->socket_tx_nbytes); \
+ msgbuf_t msgbuf = \
+ { \
+ .q = 0, \
+ .gc_mark_timestamp = 0, \
+ .data_len = htonl(scm->socket_tx_nbytes), \
+ }; \
\
+ /* coverity[UNINIT] */ \
n = write (scm->socket_fd, &msgbuf, sizeof (msgbuf)); \
if (n < sizeof (msgbuf)) \
clib_unix_warning ("socket write (msgbuf)"); \