summaryrefslogtreecommitdiffstats
path: root/xup
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-26 13:33:23 -0700
committerLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-26 13:33:23 -0700
commit27055d5762d23ae3996e7e41ef45ef6454fa2d65 (patch)
treeb45025733988961e08bde0c7e495f73c939a9937 /xup
parentfde7be5151f7db096610cb59ca964e22e6af79fb (diff)
downloadxrdp-proprietary-27055d5762d23ae3996e7e41ef45ef6454fa2d65.tar.gz
xrdp-proprietary-27055d5762d23ae3996e7e41ef45ef6454fa2d65.zip
coverity: improper use of negative value
Diffstat (limited to 'xup')
-rw-r--r--xup/xup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xup/xup.c b/xup/xup.c
index 294500be..4964692a 100644
--- a/xup/xup.c
+++ b/xup/xup.c
@@ -212,10 +212,15 @@ lib_mod_connect(struct mod *mod)
if (use_uds)
{
mod->sck = g_tcp_local_socket();
+ if (mod->sck < 0)
+ return 1;
}
else
{
mod->sck = g_tcp_socket();
+ if (mod->sck < 0)
+ return 1;
+
g_tcp_set_non_blocking(mod->sck);
g_tcp_set_no_delay(mod->sck);
}