Skip to content

Commit

Permalink
BLOCK_ADJUST_ERRNO: move rc to right level
Browse files Browse the repository at this point in the history
We can't declare the variable within the block and use it in the final
do-while() expression to be properly portable C89.
  • Loading branch information
bagder committed May 4, 2011
1 parent c5ec167 commit 4ed1e9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
time_t entry_time = time (NULL); \
do { \
rc = x; \
/* the order of the check below is important to properly deal with the
case when the 'sess' is freed */ \
/* the order of the check below is important to properly deal with \
the case when the 'sess' is freed */ \
if((rc != LIBSSH2_ERROR_EAGAIN) || !sess->api_block_mode) \
break; \
rc = _libssh2_wait_socket(sess, entry_time); \
Expand All @@ -73,8 +73,8 @@
#define BLOCK_ADJUST_ERRNO(ptr,sess,x) \
do { \
time_t entry_time = time (NULL); \
int rc; \
do { \
int rc; \
ptr = x; \
if(!sess->api_block_mode || \
(ptr != NULL) || \
Expand Down

0 comments on commit 4ed1e9d

Please sign in to comment.