Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
62e48f83
Commit
62e48f83
authored
May 17, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: assignment within complex condition
Solution: restructured code, inverted condition
parent
fcee4ccd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
zmq.cpp
src/zmq.cpp
+12
-10
No files found.
src/zmq.cpp
View file @
62e48f83
...
@@ -685,7 +685,7 @@ const char *zmq_msg_gets (const zmq_msg_t *msg_, const char *property_)
...
@@ -685,7 +685,7 @@ const char *zmq_msg_gets (const zmq_msg_t *msg_, const char *property_)
}
}
}
}
// Polling.
// Polling.
#if defined ZMQ_HAVE_POLLER
#if defined ZMQ_HAVE_POLLER
inline
int
zmq_poller_poll
(
zmq_pollitem_t
*
items_
,
int
nitems_
,
long
timeout_
)
inline
int
zmq_poller_poll
(
zmq_pollitem_t
*
items_
,
int
nitems_
,
long
timeout_
)
...
@@ -1176,18 +1176,20 @@ void *zmq_poller_new (void)
...
@@ -1176,18 +1176,20 @@ void *zmq_poller_new (void)
int
zmq_poller_destroy
(
void
**
poller_p_
)
int
zmq_poller_destroy
(
void
**
poller_p_
)
{
{
void
*
poller
;
if
(
poller_p_
)
{
if
(
!
poller_p_
||
!
(
poller
=
*
poller_p_
)
zmq
::
socket_poller_t
*
const
poller
=
||
!
((
zmq
::
socket_poller_t
*
)
poller
)
->
check_tag
())
{
static_cast
<
zmq
::
socket_poller_t
*>
(
*
poller_p_
);
errno
=
EFAULT
;
if
(
poller
&&
poller
->
check_tag
())
{
return
-
1
;
delete
poller
;
*
poller_p_
=
NULL
;
return
0
;
}
}
}
errno
=
EFAULT
;
delete
((
zmq
::
socket_poller_t
*
)
poller
);
return
-
1
;
*
poller_p_
=
NULL
;
return
0
;
}
}
static
int
check_poller
(
void
*
const
poller_
)
static
int
check_poller
(
void
*
const
poller_
)
{
{
if
(
!
poller_
||
!
((
zmq
::
socket_poller_t
*
)
poller_
)
->
check_tag
())
{
if
(
!
poller_
||
!
((
zmq
::
socket_poller_t
*
)
poller_
)
->
check_tag
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment