Commit 022cf2ae authored by Constantin Rack's avatar Constantin Rack

Problem: source code contains tabs

Solution: replace tabes with spaces
parent e8d665c4
...@@ -91,7 +91,7 @@ zmq::ctx_t::ctx_t () : ...@@ -91,7 +91,7 @@ zmq::ctx_t::ctx_t () :
vmci_family = -1; vmci_family = -1;
#endif #endif
scoped_lock_t locker(crypto_sync); scoped_lock_t locker(crypto_sync);
#if defined (ZMQ_USE_TWEETNACL) #if defined (ZMQ_USE_TWEETNACL)
// allow opening of /dev/urandom // allow opening of /dev/urandom
unsigned char tmpbytes[4]; unsigned char tmpbytes[4];
...@@ -510,13 +510,13 @@ void zmq::ctx_t::pend_connection (const std::string &addr_, ...@@ -510,13 +510,13 @@ void zmq::ctx_t::pend_connection (const std::string &addr_,
endpoints_t::iterator it = endpoints.find (addr_); endpoints_t::iterator it = endpoints.find (addr_);
if (it == endpoints.end ()) { if (it == endpoints.end ()) {
// Still no bind. // Still no bind.
endpoint_.socket->inc_seqnum (); endpoint_.socket->inc_seqnum ();
pending_connections.insert (pending_connections_t::value_type (addr_, pending_connection)); pending_connections.insert (pending_connections_t::value_type (addr_, pending_connection));
} else { } else {
// Bind has happened in the mean time, connect directly // Bind has happened in the mean time, connect directly
connect_inproc_sockets(it->second.socket, it->second.options, pending_connection, connect_side); connect_inproc_sockets(it->second.socket, it->second.options, pending_connection, connect_side);
} }
} }
void zmq::ctx_t::connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_) void zmq::ctx_t::connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_)
......
...@@ -53,7 +53,7 @@ zmq::dgram_t::~dgram_t () ...@@ -53,7 +53,7 @@ zmq::dgram_t::~dgram_t ()
void zmq::dgram_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) void zmq::dgram_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
LIBZMQ_UNUSED(subscribe_to_all_); LIBZMQ_UNUSED(subscribe_to_all_);
zmq_assert (pipe_); zmq_assert (pipe_);
......
...@@ -130,7 +130,7 @@ int zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_) ...@@ -130,7 +130,7 @@ int zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_)
rc = getpeername (sockfd_, (struct sockaddr*) &ss, &addrlen); rc = getpeername (sockfd_, (struct sockaddr*) &ss, &addrlen);
#ifdef ZMQ_HAVE_WINDOWS #ifdef ZMQ_HAVE_WINDOWS
if (rc == SOCKET_ERROR) { if (rc == SOCKET_ERROR) {
const int last_error = WSAGetLastError(); const int last_error = WSAGetLastError();
wsa_assert (last_error != WSANOTINITIALISED && wsa_assert (last_error != WSANOTINITIALISED &&
last_error != WSAEFAULT && last_error != WSAEFAULT &&
last_error != WSAEINPROGRESS && last_error != WSAEINPROGRESS &&
......
...@@ -390,12 +390,12 @@ void zmq::pipe_t::terminate (bool delay_) ...@@ -390,12 +390,12 @@ void zmq::pipe_t::terminate (bool delay_)
// If terminate was already called, we can ignore the duplicate invocation. // If terminate was already called, we can ignore the duplicate invocation.
if (state == term_req_sent1 || state == term_req_sent2) { if (state == term_req_sent1 || state == term_req_sent2) {
return; return;
} }
// If the pipe is in the final phase of async termination, it's going to // If the pipe is in the final phase of async termination, it's going to
// closed anyway. No need to do anything special here. // closed anyway. No need to do anything special here.
else if (state == term_ack_sent) { else if (state == term_ack_sent) {
return; return;
} }
// The simple sync termination case. Ask the peer to terminate and wait // The simple sync termination case. Ask the peer to terminate and wait
// for the ack. // for the ack.
else if (state == active) { else if (state == active) {
...@@ -422,7 +422,7 @@ void zmq::pipe_t::terminate (bool delay_) ...@@ -422,7 +422,7 @@ void zmq::pipe_t::terminate (bool delay_)
// There are no other states. // There are no other states.
else { else {
zmq_assert (false); zmq_assert (false);
} }
// Stop outbound flow of messages. // Stop outbound flow of messages.
out_active = false; out_active = false;
......
...@@ -432,9 +432,9 @@ bool zmq::select_t::is_retired_fd (const fd_entry_t &entry) ...@@ -432,9 +432,9 @@ bool zmq::select_t::is_retired_fd (const fd_entry_t &entry)
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
u_short zmq::select_t::get_fd_family (fd_t fd_) u_short zmq::select_t::get_fd_family (fd_t fd_)
{ {
// Use sockaddr_storage instead of sockaddr to accomodate differect structure sizes // Use sockaddr_storage instead of sockaddr to accomodate differect structure sizes
sockaddr_storage addr = { 0 }; sockaddr_storage addr = { 0 };
int addr_size = sizeof addr; int addr_size = sizeof addr;
int type; int type;
int type_length = sizeof(int); int type_length = sizeof(int);
......
...@@ -338,11 +338,11 @@ int zmq::signaler_t::recv_failable () ...@@ -338,11 +338,11 @@ int zmq::signaler_t::recv_failable ()
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
int nbytes = ::recv (r, (char *) &dummy, sizeof (dummy), 0); int nbytes = ::recv (r, (char *) &dummy, sizeof (dummy), 0);
if (nbytes == SOCKET_ERROR) { if (nbytes == SOCKET_ERROR) {
const int last_error = WSAGetLastError(); const int last_error = WSAGetLastError();
if (last_error == WSAEWOULDBLOCK) { if (last_error == WSAEWOULDBLOCK) {
errno = EAGAIN; errno = EAGAIN;
return -1; return -1;
} }
wsa_assert (last_error == WSAEWOULDBLOCK); wsa_assert (last_error == WSAEWOULDBLOCK);
} }
#else #else
...@@ -388,7 +388,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) ...@@ -388,7 +388,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
#elif defined ZMQ_HAVE_WINDOWS #elif defined ZMQ_HAVE_WINDOWS
# if !defined _WIN32_WCE # if !defined _WIN32_WCE
// Windows CE does not manage security attributes // Windows CE does not manage security attributes
SECURITY_DESCRIPTOR sd; SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sa; SECURITY_ATTRIBUTES sa;
memset (&sd, 0, sizeof sd); memset (&sd, 0, sizeof sd);
......
...@@ -432,7 +432,7 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_, ...@@ -432,7 +432,7 @@ int zmq::socket_base_t::getsockopt (int option_, void *optval_,
return -1; return -1;
} }
memset(optval_, 0, *optvallen_); memset(optval_, 0, *optvallen_);
*((int*) optval_) = thread_safe ? 1 : 0; *((int*) optval_) = thread_safe ? 1 : 0;
*optvallen_ = sizeof (int); *optvallen_ = sizeof (int);
return 0; return 0;
} }
......
...@@ -60,7 +60,7 @@ zmq::stream_t::~stream_t () ...@@ -60,7 +60,7 @@ zmq::stream_t::~stream_t ()
void zmq::stream_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) void zmq::stream_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
LIBZMQ_UNUSED(subscribe_to_all_); LIBZMQ_UNUSED(subscribe_to_all_);
zmq_assert (pipe_); zmq_assert (pipe_);
......
...@@ -189,7 +189,7 @@ void zmq::tune_tcp_maxrt (fd_t sockfd_, int timeout_) ...@@ -189,7 +189,7 @@ void zmq::tune_tcp_maxrt (fd_t sockfd_, int timeout_)
// If not a single byte can be written to the socket in non-blocking mode // If not a single byte can be written to the socket in non-blocking mode
// we'll get an error (this may happen during the speculative write). // we'll get an error (this may happen during the speculative write).
const int last_error = WSAGetLastError(); const int last_error = WSAGetLastError();
if (nbytes == SOCKET_ERROR && last_error == WSAEWOULDBLOCK) if (nbytes == SOCKET_ERROR && last_error == WSAEWOULDBLOCK)
return 0; return 0;
...@@ -201,7 +201,7 @@ void zmq::tune_tcp_maxrt (fd_t sockfd_, int timeout_) ...@@ -201,7 +201,7 @@ void zmq::tune_tcp_maxrt (fd_t sockfd_, int timeout_)
last_error == WSAECONNABORTED || last_error == WSAECONNABORTED ||
last_error == WSAETIMEDOUT || last_error == WSAETIMEDOUT ||
last_error == WSAECONNRESET last_error == WSAECONNRESET
)) ))
return -1; return -1;
// Circumvent a Windows bug: // Circumvent a Windows bug:
...@@ -256,12 +256,12 @@ int zmq::tcp_read (fd_t s_, void *data_, size_t size_) ...@@ -256,12 +256,12 @@ int zmq::tcp_read (fd_t s_, void *data_, size_t size_)
errno = EAGAIN; errno = EAGAIN;
} }
else { else {
wsa_assert (last_error == WSAENETDOWN || wsa_assert (last_error == WSAENETDOWN ||
last_error == WSAENETRESET || last_error == WSAENETRESET ||
last_error == WSAECONNABORTED || last_error == WSAECONNABORTED ||
last_error == WSAETIMEDOUT || last_error == WSAETIMEDOUT ||
last_error == WSAECONNRESET || last_error == WSAECONNRESET ||
last_error == WSAECONNREFUSED || last_error == WSAECONNREFUSED ||
last_error == WSAENOTCONN); last_error == WSAENOTCONN);
errno = wsa_error_to_errno (last_error); errno = wsa_error_to_errno (last_error);
} }
......
...@@ -281,7 +281,7 @@ zmq::fd_t zmq::tcp_listener_t::accept () ...@@ -281,7 +281,7 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
#ifdef ZMQ_HAVE_WINDOWS #ifdef ZMQ_HAVE_WINDOWS
if (sock == INVALID_SOCKET) { if (sock == INVALID_SOCKET) {
const int last_error = WSAGetLastError(); const int last_error = WSAGetLastError();
wsa_assert (last_error == WSAEWOULDBLOCK || wsa_assert (last_error == WSAEWOULDBLOCK ||
last_error == WSAECONNRESET || last_error == WSAECONNRESET ||
last_error == WSAEMFILE || last_error == WSAEMFILE ||
......
...@@ -573,8 +573,8 @@ int crypto_hashblocks(u8 *x,const u8 *m,u64 n) ...@@ -573,8 +573,8 @@ int crypto_hashblocks(u8 *x,const u8 *m,u64 n)
b[3] += t; b[3] += t;
FOR(j,8) a[(j+1)%8] = b[j]; FOR(j,8) a[(j+1)%8] = b[j];
if (i%16 == 15) if (i%16 == 15)
FOR(j,16) FOR(j,16)
w[j] += w[(j+9)%16] + sigma0(w[(j+1)%16]) + sigma1(w[(j+14)%16]); w[j] += w[(j+9)%16] + sigma0(w[(j+1)%16]) + sigma1(w[(j+14)%16]);
} }
FOR(i,8) { a[i] += z[i]; z[i] = a[i]; } FOR(i,8) { a[i] += z[i]; z[i] = a[i]; }
......
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