aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-09 16:55:38 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-09 16:55:38 -0700
commit052dad14137e60c24e6bf6e4551d7009bdeb19e9 (patch)
treec24644396f0ac5bc84c40e0df164c53074654c18 /src
parent032c74653cc2035b539ee48183055a9354e9b888 (diff)
downloadnng-052dad14137e60c24e6bf6e4551d7009bdeb19e9.tar.gz
nng-052dad14137e60c24e6bf6e4551d7009bdeb19e9.tar.bz2
nng-052dad14137e60c24e6bf6e4551d7009bdeb19e9.zip
Fix problems found in Windows build.
Diffstat (limited to 'src')
-rw-r--r--src/core/socket.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index f01379a8..240af252 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -418,11 +418,9 @@ nni_sock_sys_fini(void)
int
nni_sock_open(nni_sock **sockp, const nni_proto *proto)
{
- nni_sock * sock;
- int rv;
- nni_proto_sock_ops *sops;
- nni_proto_pipe_ops *pops;
- uint32_t sockid;
+ nni_sock *sock;
+ int rv;
+ uint32_t sockid;
if (proto->proto_version != NNI_PROTOCOL_VERSION) {
// unsupported protocol version
@@ -445,7 +443,6 @@ nni_sock_open(nni_sock **sockp, const nni_proto *proto)
sock->s_sock_ops = *proto->proto_sock_ops;
sock->s_pipe_ops = *proto->proto_pipe_ops;
- sops = &sock->s_sock_ops;
NNI_ASSERT(sock->s_sock_ops.sock_open != NULL);
NNI_ASSERT(sock->s_sock_ops.sock_close != NULL);
@@ -457,7 +454,7 @@ nni_sock_open(nni_sock **sockp, const nni_proto *proto)
return (rv);
}
- sops->sock_open(sock->s_data);
+ sock->s_sock_ops.sock_open(sock->s_data);
nni_mtx_lock(&nni_sock_lk);
nni_list_append(&nni_sock_list, sock);