diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-07 18:41:56 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-07 18:41:56 -0700 |
| commit | 3cedf14c3586b0770cb9ee62c75f922ab2006153 (patch) | |
| tree | 2fd6422cd97f91330896a47ba5e68c20705f2c28 /src/core/socket.c | |
| parent | 021d09af1375834fe9aaca916e60dcd2ad3be845 (diff) | |
| download | nng-3cedf14c3586b0770cb9ee62c75f922ab2006153.tar.gz nng-3cedf14c3586b0770cb9ee62c75f922ab2006153.tar.bz2 nng-3cedf14c3586b0770cb9ee62c75f922ab2006153.zip | |
SRWLocks FTW!
Modern Windows (Vista and later) have light weight Slim Read/Write locks
which only occupy 64 bits, and don't require any memory allocation to
create.
While here clean up a few more unreferenced variables found with the
Microsoft compilers.
Diffstat (limited to 'src/core/socket.c')
| -rw-r--r-- | src/core/socket.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index 66f5c63b..f7712aa3 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -472,7 +472,6 @@ nni_sock_shutdown(nni_sock *sock) nni_pipe *pipe; nni_ep *ep; nni_time linger; - int i; nni_mtx_lock(&sock->s_mx); if (sock->s_closing) { @@ -577,8 +576,6 @@ nni_sock_shutdown(nni_sock *sock) int nni_sock_ep_add(nni_sock *sock, nni_ep *ep) { - int rv; - nni_mtx_lock(&sock->s_mx); if (sock->s_closing) { nni_mtx_unlock(&sock->s_mx); @@ -613,9 +610,6 @@ nni_sock_ep_remove(nni_sock *sock, nni_ep *ep) void nni_sock_close(nni_sock *sock) { - int i; - nni_notify *notify; - // Shutdown everything if not already done. This operation // is idempotent. nni_sock_shutdown(sock); |
