summaryrefslogtreecommitdiffstats
path: root/proxy/src/client
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-04-03 14:38:58 -0400
committerSimo Sorce <simo@redhat.com>2013-04-03 16:39:11 -0400
commitb5fd9388baba101a3ae7b8a2f88164af2083a0a7 (patch)
tree029c20ad0de3f25859f649af50f96da282f3da90 /proxy/src/client
parentc4cddebdc4d1062c46145a2623f276631840e221 (diff)
downloadgss-proxy-b5fd9388baba101a3ae7b8a2f88164af2083a0a7.tar.gz
gss-proxy-b5fd9388baba101a3ae7b8a2f88164af2083a0a7.tar.xz
gss-proxy-b5fd9388baba101a3ae7b8a2f88164af2083a0a7.zip
Fix reporting of wrong error codes
Found by Coverity as 'Argument cannot be negative' type of error. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src/client')
-rw-r--r--proxy/src/client/gpm_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c
index d3dbaff..80f487c 100644
--- a/proxy/src/client/gpm_common.c
+++ b/proxy/src/client/gpm_common.c
@@ -98,6 +98,9 @@ static int gpm_open_socket(struct gpm_ctx *gpmctx)
}
ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr));
+ if (ret == -1) {
+ ret = errno;
+ }
done:
if (ret) {