mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
tidy-up: fix more nits
- fix indentation errors. - reformat `cmake/FindmbedTLS.cmake` - replace a macro with a variable in `example/sftp_RW_nonblock.c`. - delete macOS macro `_DARWIN_USE_64_BIT_INODE` from the OS/400 config header, `os400/libssh2_config.h`. - fix other minor nits. Closes #983
This commit is contained in:
@@ -53,15 +53,15 @@
|
||||
*/
|
||||
#define BLOCK_ADJUST(rc, sess, x) \
|
||||
do { \
|
||||
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 */ \
|
||||
if((rc != LIBSSH2_ERROR_EAGAIN) || !sess->api_block_mode) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
} while(!rc); \
|
||||
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 */ \
|
||||
if((rc != LIBSSH2_ERROR_EAGAIN) || !sess->api_block_mode) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
} while(!rc); \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
@@ -72,15 +72,15 @@
|
||||
*/
|
||||
#define BLOCK_ADJUST_ERRNO(ptr, sess, x) \
|
||||
do { \
|
||||
time_t entry_time = time(NULL); \
|
||||
int rc; \
|
||||
do { \
|
||||
ptr = x; \
|
||||
if(!sess->api_block_mode || \
|
||||
(ptr != NULL) || \
|
||||
(libssh2_session_last_errno(sess) != LIBSSH2_ERROR_EAGAIN) ) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
time_t entry_time = time(NULL); \
|
||||
int rc; \
|
||||
do { \
|
||||
ptr = x; \
|
||||
if(!sess->api_block_mode || \
|
||||
(ptr != NULL) || \
|
||||
(libssh2_session_last_errno(sess) != LIBSSH2_ERROR_EAGAIN) ) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
} while(!rc); \
|
||||
} while(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user