From 4ed1e9d96b35f74e8f87d2fa95073a7678a06eab Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 May 2011 23:06:13 +0200 Subject: [PATCH] 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. --- src/session.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/session.h b/src/session.h index 2866fcb..aff4f2c 100644 --- a/src/session.h +++ b/src/session.h @@ -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) || \