0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00

Fixed issue #344

This commit is contained in:
Pieter Hintjens 2012-03-21 17:43:52 -05:00
parent 8a64d80fba
commit 860e1d24c0

View File

@ -85,14 +85,11 @@ int zmq::xrep_t::xsetsockopt (int option_, const void *optval_,
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
if (optvallen_ != sizeof (int) || *((int*) optval_) < 0) {
if(sizeof(optvallen_) != sizeof(int)) {
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
fail_unroutable = *((const int*) optval_); fail_unroutable = *((const int*) optval_);
return 0; return 0;
} }