Commit ace8f753 authored by Ian Barber's avatar Ian Barber

Merge pull request #370 from hurtonm/code_cleanup

Use struct keyword consistently with sockaddr and sockaddr_in
parents e9bfd76f 1f536972
...@@ -298,7 +298,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) ...@@ -298,7 +298,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
wsa_assert (rc != SOCKET_ERROR); wsa_assert (rc != SOCKET_ERROR);
// Connect writer to the listener. // Connect writer to the listener.
rc = connect (*w_, (sockaddr *) &addr, sizeof (addr)); rc = connect (*w_, (struct sockaddr*) &addr, sizeof (addr));
wsa_assert (rc != SOCKET_ERROR); wsa_assert (rc != SOCKET_ERROR);
// Accept connection from writer. // Accept connection from writer.
...@@ -327,7 +327,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) ...@@ -327,7 +327,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
// //
// The bug will be fixed in V5.6 ECO4 and beyond. In the meantime, we'll // The bug will be fixed in V5.6 ECO4 and beyond. In the meantime, we'll
// create the socket pair manually. // create the socket pair manually.
sockaddr_in lcladdr; struct sockaddr_in lcladdr;
memset (&lcladdr, 0, sizeof (lcladdr)); memset (&lcladdr, 0, sizeof (lcladdr));
lcladdr.sin_family = AF_INET; lcladdr.sin_family = AF_INET;
lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment