1
1

BLOCK_ADJUST_ERRNO: move rc to right level

We can't declare the variable within the block and use it in the final
do-while() expression to be properly portable C89.
Этот коммит содержится в:
Daniel Stenberg 2011-05-04 23:06:13 +02:00
родитель c5ec167881
Коммит 4ed1e9d96b

Просмотреть файл

@ -56,8 +56,8 @@
time_t entry_time = time (NULL); \ time_t entry_time = time (NULL); \
do { \ do { \
rc = x; \ rc = x; \
/* the order of the check below is important to properly deal with the /* the order of the check below is important to properly deal with \
case when the 'sess' is freed */ \ the case when the 'sess' is freed */ \
if((rc != LIBSSH2_ERROR_EAGAIN) || !sess->api_block_mode) \ if((rc != LIBSSH2_ERROR_EAGAIN) || !sess->api_block_mode) \
break; \ break; \
rc = _libssh2_wait_socket(sess, entry_time); \ rc = _libssh2_wait_socket(sess, entry_time); \
@ -73,8 +73,8 @@
#define BLOCK_ADJUST_ERRNO(ptr,sess,x) \ #define BLOCK_ADJUST_ERRNO(ptr,sess,x) \
do { \ do { \
time_t entry_time = time (NULL); \ time_t entry_time = time (NULL); \
int rc; \
do { \ do { \
int rc; \
ptr = x; \ ptr = x; \
if(!sess->api_block_mode || \ if(!sess->api_block_mode || \
(ptr != NULL) || \ (ptr != NULL) || \