diff options
Diffstat (limited to 'sesman/libscp/libscp_session.c')
-rw-r--r-- | sesman/libscp/libscp_session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sesman/libscp/libscp_session.c b/sesman/libscp/libscp_session.c index c5599985..38f801e9 100644 --- a/sesman/libscp/libscp_session.c +++ b/sesman/libscp/libscp_session.c @@ -335,7 +335,7 @@ scp_session_set_addr(struct SCP_SESSION* s, int type, void* addr) case SCP_ADDRESS_TYPE_IPV4: /* convert from char to 32bit*/ ret = inet_pton(AF_INET, addr, &ip4); - if (0 == ret) + if (ret == 0) { log_message(s_log, LOG_LEVEL_WARNING, "[session:%d] set_addr: invalid address", __LINE__); inet_pton(AF_INET, "127.0.0.1", &ip4); @@ -351,7 +351,7 @@ scp_session_set_addr(struct SCP_SESSION* s, int type, void* addr) case SCP_ADDRESS_TYPE_IPV6: /* convert from char to 128bit*/ ret = inet_pton(AF_INET6, addr, &ip6); - if (0 == ret) + if (ret == 0) { log_message(s_log, LOG_LEVEL_WARNING, "[session:%d] set_addr: invalid address", __LINE__); inet_pton(AF_INET, "::1", &ip6); |