use g_memcpy, braces

This commit is contained in:
Jay Sorg 2017-11-07 11:51:23 -08:00 committed by jsorg71
parent 26507644e3
commit c6c513b23c
2 changed files with 3 additions and 1 deletions

View File

@ -1011,7 +1011,7 @@ g_sck_vsock_bind(int sck, const char *port)
#if defined(XRDP_ENABLE_VSOCK)
struct sockaddr_vm s;
memset(&s, 0, sizeof(struct sockaddr_vm));
g_memset(&s, 0, sizeof(struct sockaddr_vm));
s.svm_family = AF_VSOCK;
s.svm_port = atoi(port);
s.svm_cid = VMADDR_CID_ANY;

View File

@ -835,7 +835,9 @@ trans_listen_address(struct trans *self, char *port, const char *address)
{
self->sck = g_sck_vsock_socket();
if (self->sck < 0)
{
return 1;
}
g_tcp_set_non_blocking(self->sck);