From 4a4f96d1f67441e2902a0806f1d7c4b29a072ca3 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Mon, 3 Jan 2011 22:19:40 +0100 Subject: vty: Fix typo testing return value of bind Thanks to playya__ (Dr. Fred) on IRC for pointing this out Signed-off-by: Sylvain Munaut --- src/vty/telnet_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 1523a899..098fa2e6 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -70,7 +70,7 @@ int telnet_init(void *tall_ctx, void *priv, int port) sock_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); rc = bind(fd, (struct sockaddr*)&sock_addr, sizeof(sock_addr)); - if (bind < 0) { + if (rc < 0) { LOGP(0, LOGL_ERROR, "Telnet interface failed to bind\n"); close(fd); return rc; -- cgit v1.2.3