1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

example: silence MSVS 2013 C4127 warnings (#828)

This commit is contained in:
Viktor Szakats
2023-03-09 10:46:40 +01:00
committed by GitHub
parent 33b6d5f89d
commit 99c1333ba7
11 changed files with 30 additions and 7 deletions

View File

@ -246,7 +246,7 @@ int main(int argc, char *argv[])
/* Must use non-blocking IO hereafter due to the current libssh2 API */
libssh2_session_set_blocking(session, 0);
while(1) {
for(;;) {
FD_ZERO(&fds);
FD_SET(forwardsock, &fds);
tv.tv_sec = 0;
@ -277,7 +277,7 @@ int main(int argc, char *argv[])
wr += i;
} while(i > 0 && wr < len);
}
while(1) {
for(;;) {
len = libssh2_channel_read(channel, buf, sizeof(buf));
if(LIBSSH2_ERROR_EAGAIN == len)
break;