Remove CONFIG_NET_HAVE_REUSEADDR check from telnetd_daemon

since this option doesn't exist at all

Change-Id: I9ee8e61d0a8af1c9eb690b2f2945a7f7f7b5f834
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-02-03 16:58:00 +08:00 committed by patacongo
parent 28891ef27e
commit 579327a972

View File

@ -127,9 +127,7 @@ static int telnetd_daemon(int argc, FAR char *argv[])
int listensd;
int acceptsd;
int drvrfd;
#ifdef CONFIG_NET_HAVE_REUSEADDR
int optval;
#endif
int ret;
int fd;
@ -183,14 +181,12 @@ static int telnetd_daemon(int argc, FAR char *argv[])
/* Set socket to reuse address */
#ifdef CONFIG_NET_HAVE_REUSEADDR
optval = 1;
if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0)
{
nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno);
goto errout_with_socket;
}
#endif
/* Bind the socket to a local address */