summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-01-03 22:19:40 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-01-03 22:19:40 +0100
commit4a4f96d1f67441e2902a0806f1d7c4b29a072ca3 (patch)
treeb4dff38ff47ac16b0d3031632772ef5d3d70cc3b /src
parent9c559147c72d3f22a9d642dbad8be659902377c3 (diff)
vty: Fix typo testing return value of bind
Thanks to playya__ (Dr. Fred) on IRC for pointing this out Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src')
-rw-r--r--src/vty/telnet_interface.c2
1 files changed, 1 insertions, 1 deletions
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;