[rtems commit] telnetd: Ignore setsockopt() return status

Sebastian Huber sebh at rtems.org
Wed Oct 10 11:59:17 UTC 2018


Module:    rtems
Branch:    master
Commit:    2806e10dc1997a8d48231c9eaf1bbae62718ee25
Changeset: http://git.rtems.org/rtems/commit/?id=2806e10dc1997a8d48231c9eaf1bbae62718ee25

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Oct  9 08:38:11 2018 +0200

telnetd: Ignore setsockopt() return status

Update #3529.

---

 cpukit/telnetd/pty.c     | 2 +-
 cpukit/telnetd/telnetd.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c
index e32d2ea..7a47fdd 100644
--- a/cpukit/telnetd/pty.c
+++ b/cpukit/telnetd/pty.c
@@ -117,7 +117,7 @@ char *telnet_get_pty(rtems_pty_context *pty, int socket)
   /* set a long polling interval to save CPU time */
   t.tv_sec=2;
   t.tv_usec=00000;
-  setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, &t, sizeof(t));
+  (void)setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, &t, sizeof(t));
 
   /* inform the client that we will echo */
   send_iac(pty, IAC_WILL, 1);
diff --git a/cpukit/telnetd/telnetd.c b/cpukit/telnetd/telnetd.c
index 81c03b1..650b0f9 100644
--- a/cpukit/telnetd/telnetd.c
+++ b/cpukit/telnetd/telnetd.c
@@ -213,7 +213,7 @@ rtems_task_telnetd(void *task_argument)
     perror("telnetd:socket");
     rtems_task_exit();
   };
-  setsockopt(des_socket,SOL_SOCKET,SO_KEEPALIVE,&i,sizeof(i));
+  (void)setsockopt(des_socket,SOL_SOCKET,SO_KEEPALIVE,&i,sizeof(i));
 
   memset(&srv,0,sizeof(srv));
   srv.sin.sin_family=AF_INET;



More information about the vc mailing list