Commit 8b7ac4ff authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #902 from pavel-pimenov/fix-pvs-studio-v547

Fix build with ZMQ_HAVE_WINDOWS (typedef UINT_PTR fd_t; -> unsigned type...
parents 88ed56fa acfbfe53
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <vector> #include <vector>
#ifdef ZMQ_HAVE_WINDOWS #ifdef ZMQ_HAVE_WINDOWS
#include "winsock2.h" #include <winsock2.h>
#elif defined ZMQ_HAVE_OPENVMS #elif defined ZMQ_HAVE_OPENVMS
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
......
...@@ -842,7 +842,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_) ...@@ -842,7 +842,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
// If we have the message, return immediately. // If we have the message, return immediately.
if (rc == 0) { if (rc == 0) {
if (file_desc >= 0) if (file_desc != retired_fd)
msg_->set_fd(file_desc); msg_->set_fd(file_desc);
extract_flags (msg_); extract_flags (msg_);
return 0; return 0;
...@@ -860,7 +860,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_) ...@@ -860,7 +860,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
rc = xrecv (msg_); rc = xrecv (msg_);
if (rc < 0) if (rc < 0)
return rc; return rc;
if (file_desc >= 0) if (file_desc != retired_fd)
msg_->set_fd(file_desc); msg_->set_fd(file_desc);
extract_flags (msg_); extract_flags (msg_);
return 0; return 0;
...@@ -894,7 +894,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_) ...@@ -894,7 +894,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
} }
} }
if (file_desc >= 0) if (file_desc != retired_fd)
msg_->set_fd(file_desc); msg_->set_fd(file_desc);
extract_flags (msg_); extract_flags (msg_);
return 0; return 0;
......
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