From 79d63df12de4de19c51b43b9bb1dd3f2ff3ee9d7 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Mon, 29 Dec 2014 18:24:17 +0100 Subject: [PATCH] examples/x11.c: remove dead assigments of some return values Detected by clang scan in line 212, column 9. Detected by clang scan in line 222, column 13. Detected by clang scan in line 410, column 13. --- example/x11.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/example/x11.c b/example/x11.c index 53eff1ab..32ae13c2 100644 --- a/example/x11.c +++ b/example/x11.c @@ -209,17 +209,17 @@ static int x11_send_receive(LIBSSH2_CHANNEL *channel, int sock) rc = libssh2_poll(fds, nfds, 0); if (rc >0) { rc = libssh2_channel_read(channel, buf, bufsize); - rc = write(sock, buf, rc); + write(sock, buf, rc); } - rc = select(sock+1,&set,NULL,NULL,&timeval_out); + rc = select(sock+1, &set, NULL, NULL, &timeval_out); if (rc > 0) { - memset((void *)buf,0,bufsize); + memset((void *)buf, 0, bufsize); /* Data in sock*/ rc = read(sock, buf, bufsize); if (rc > 0) { - rc = libssh2_channel_write(channel, buf, rc); + libssh2_channel_write(channel, buf, rc); } else { free(buf); @@ -229,7 +229,7 @@ static int x11_send_receive(LIBSSH2_CHANNEL *channel, int sock) free(fds); free(buf); - if (libssh2_channel_eof (channel) == 1) { + if (libssh2_channel_eof(channel) == 1) { return -1; } return 0; @@ -407,7 +407,7 @@ main (int argc, char *argv[]) rc = libssh2_poll(fds, nfds, 0); if (rc >0) { - rc = libssh2_channel_read(channel, buf,sizeof(buf)); + libssh2_channel_read(channel, buf, sizeof(buf)); fprintf(stdout, "%s", buf); fflush(stdout); }