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>
This commit is contained in:
Sylvain Munaut 2011-01-03 22:19:40 +01:00
parent 9c559147c7
commit 4a4f96d1f6
1 changed files with 1 additions and 1 deletions

View File

@ -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;