mirror of https://gerrit.osmocom.org/libosmocore
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:
parent
9c559147c7
commit
4a4f96d1f6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue