mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 00:23:58 +00:00
Fix signed/unsigned comparison
This commit is contained in:
parent
3a4896f4a3
commit
111c20dc22
@ -28,7 +28,7 @@ void test_system_max ()
|
|||||||
{
|
{
|
||||||
// Keep allocating sockets until we run out of system resources
|
// Keep allocating sockets until we run out of system resources
|
||||||
|
|
||||||
const unsigned int no_of_sockets = 2 * 65536;
|
const int no_of_sockets = 2 * 65536;
|
||||||
void *ctx = zmq_ctx_new();
|
void *ctx = zmq_ctx_new();
|
||||||
zmq_ctx_set(ctx, ZMQ_MAX_SOCKETS, no_of_sockets);
|
zmq_ctx_set(ctx, ZMQ_MAX_SOCKETS, no_of_sockets);
|
||||||
std::vector<void*> sockets;
|
std::vector<void*> sockets;
|
||||||
@ -42,7 +42,7 @@ void test_system_max ()
|
|||||||
sockets.push_back(socket);
|
sockets.push_back(socket);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(sockets.size() < no_of_sockets);
|
assert((int)sockets.size() < no_of_sockets);
|
||||||
|
|
||||||
// System is out of resources, further calls to zmq_socket should return NULL.
|
// System is out of resources, further calls to zmq_socket should return NULL.
|
||||||
for (unsigned int i = 0; i < 10; ++i)
|
for (unsigned int i = 0; i < 10; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user