summaryrefslogtreecommitdiffstats
path: root/sesman/libscp/libscp_session.c
diff options
context:
space:
mode:
authorNicola Ruggero <nicola@nxnt.org>2010-11-03 16:59:26 +0100
committerNicola Ruggero <nicola@nxnt.org>2010-11-03 16:59:26 +0100
commit4cf06dbbcb8522be5fa069976c8f361fc874039f (patch)
tree6e074a89c4edadf9a75d648d1f9daf36079c03aa /sesman/libscp/libscp_session.c
parent104f762e5d3dcd659415632f442e745cef5a3bf2 (diff)
downloadxrdp-proprietary-4cf06dbbcb8522be5fa069976c8f361fc874039f.tar.gz
xrdp-proprietary-4cf06dbbcb8522be5fa069976c8f361fc874039f.zip
Major code cleanup:
- Initialized and zeroed out local variables - Check for some null pointers - Fixed some typos - Other minor changes (beautify, etc.)
Diffstat (limited to 'sesman/libscp/libscp_session.c')
-rw-r--r--sesman/libscp/libscp_session.c4
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);