Code cleanup

This commit is contained in:
Martin Hurton
2014-08-12 09:31:19 +02:00
parent bb6d18d5a2
commit 228426ac44
6 changed files with 15 additions and 46 deletions

View File

@@ -409,7 +409,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
}
break;
# endif
case ZMQ_CONFLATE:
if (is_int && (value == 0 || value == 1)) {
conflate = (value != 0);
@@ -458,12 +458,6 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
return 0;
}
break;
case ZMQ_XPUB_NODROP:
{
pub_nodrop = true;
return 0;
}
break;
default:
#if defined (ZMQ_ACT_MILITANT)
@@ -558,7 +552,7 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
return 0;
}
break;
case ZMQ_TYPE:
if (is_int) {
*value = type;
@@ -770,7 +764,7 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
return 0;
}
break;
// If libgssapi isn't installed, these options provoke EINVAL
# ifdef HAVE_LIBGSSAPI_KRB5
case ZMQ_GSSAPI_SERVER:
@@ -811,12 +805,6 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
}
break;
case ZMQ_XPUB_NODROP:
if( is_int) {
*value = pub_nodrop;
return 0;
}
break;
default:
#if defined (ZMQ_ACT_MILITANT)
malformed = false;