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

Fix build with ZMQ_HAVE_WINDOWS (typedef UINT_PTR fd_t; -> unsigned type...
This commit is contained in:
Pieter Hintjens 2014-02-21 11:02:20 +01:00
commit 8b7ac4ffdc
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@
#include <vector>
#ifdef ZMQ_HAVE_WINDOWS
#include "winsock2.h"
#include <winsock2.h>
#elif defined ZMQ_HAVE_OPENVMS
#include <sys/types.h>
#include <sys/time.h>

View File

@ -842,7 +842,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
// If we have the message, return immediately.
if (rc == 0) {
if (file_desc >= 0)
if (file_desc != retired_fd)
msg_->set_fd(file_desc);
extract_flags (msg_);
return 0;
@ -860,7 +860,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
rc = xrecv (msg_);
if (rc < 0)
return rc;
if (file_desc >= 0)
if (file_desc != retired_fd)
msg_->set_fd(file_desc);
extract_flags (msg_);
return 0;
@ -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);
extract_flags (msg_);
return 0;