Initializing port_msg fields with zeroes in Go package.

This commit is contained in:
Max Romanov
2017-12-01 16:51:30 +03:00
parent 630ec3f1ec
commit ffb1c68609
2 changed files with 4 additions and 0 deletions

View File

@@ -178,6 +178,8 @@ nxt_go_ready()
port_msg.type = _NXT_PORT_MSG_PROCESS_READY;
port_msg.last = 1;
port_msg.mmap = 0;
port_msg.nf = 0;
port_msg.mf = 0;
nxt_go_main_send(&port_msg, sizeof(port_msg), NULL, 0);
}

View File

@@ -121,6 +121,8 @@ nxt_go_new_port_mmap(nxt_go_process_t *process, nxt_port_id_t id)
port_msg.type = _NXT_PORT_MSG_MMAP;
port_msg.last = 1;
port_msg.mmap = 0;
port_msg.nf = 0;
port_msg.mf = 0;
cmsg.cm.cmsg_len = CMSG_LEN(sizeof(int));
cmsg.cm.cmsg_level = SOL_SOCKET;