Merge pull request #607 from cjuniet/master

[LIBZMQ-544] Fix compilation errors with Clang
This commit is contained in:
Pieter Hintjens 2013-07-03 15:43:09 -07:00
commit e093bd9923
2 changed files with 3 additions and 3 deletions

View File

@ -264,7 +264,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
return 0; return 0;
} }
else else
if (optvallen_ >= 0 && optvallen_ < 256 && optval_ != NULL) { if (optvallen_ > 0 && optvallen_ < 256 && optval_ != NULL) {
plain_username.assign ((const char *) optval_, optvallen_); plain_username.assign ((const char *) optval_, optvallen_);
as_server = 0; as_server = 0;
mechanism = ZMQ_PLAIN; mechanism = ZMQ_PLAIN;
@ -278,7 +278,7 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
return 0; return 0;
} }
else else
if (optvallen_ >= 0 && optvallen_ < 256 && optval_ != NULL) { if (optvallen_ > 0 && optvallen_ < 256 && optval_ != NULL) {
plain_password.assign ((const char *) optval_, optvallen_); plain_password.assign ((const char *) optval_, optvallen_);
as_server = 0; as_server = 0;
mechanism = ZMQ_PLAIN; mechanism = ZMQ_PLAIN;

View File

@ -105,4 +105,4 @@ Z85_decode (uint8_t *dest, char *string)
return dest; return dest;
} }
#endif #endif