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.
Этот коммит содержится в:
родитель
c5ec167881
Коммит
4ed1e9d96b
@ -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); \
|
||||
@ -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) || \
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user