From: David Goulet Date: Tue, 3 Jul 2012 20:28:05 +0000 (-0400) Subject: Fix inet return value in the close() fct X-Git-Tag: v2.1.0-rc1~101 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6e7423591c5edde632d79ff52ba449d99da8eb14;p=lttng-tools.git Fix inet return value in the close() fct Signed-off-by: David Goulet --- diff --git a/src/common/sessiond-comm/inet.c b/src/common/sessiond-comm/inet.c index 51ac670f2..3cf8f5d3f 100644 --- a/src/common/sessiond-comm/inet.c +++ b/src/common/sessiond-comm/inet.c @@ -272,15 +272,15 @@ ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, void *buf, */ int lttcomm_close_inet_sock(struct lttcomm_sock *sock) { - int ret, closeret; + int ret; /* Don't try to close an invalid mark socket */ if (sock->fd == -1) { return 0; } - closeret = close(sock->fd); - if (closeret) { + ret = close(sock->fd); + if (ret) { PERROR("close inet"); } diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index 38822ca63..ac6d0988a 100644 --- a/src/common/sessiond-comm/inet6.c +++ b/src/common/sessiond-comm/inet6.c @@ -272,15 +272,15 @@ ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, void *buf, */ int lttcomm_close_inet6_sock(struct lttcomm_sock *sock) { - int ret, closeret; + int ret; /* Don't try to close an invalid mark socket */ if (sock->fd == -1) { return 0; } - closeret = close(sock->fd); - if (closeret) { + ret = close(sock->fd); + if (ret) { PERROR("close inet6"); }