Return-Path: From: Andrei Emeltchenko To: linux-bluetooth@vger.kernel.org Subject: [PATCH 6/6] avdtp: Remove unneeded local variable Date: Tue, 3 Dec 2013 17:53:13 +0200 Message-Id: <1386085993-22055-6-git-send-email-Andrei.Emeltchenko.news@gmail.com> In-Reply-To: <1386085993-22055-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> References: <1386085993-22055-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Andrei Emeltchenko --- profiles/audio/avdtp.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c index f866b39..e12ad9d 100644 --- a/profiles/audio/avdtp.c +++ b/profiles/audio/avdtp.c @@ -773,10 +773,9 @@ static int get_send_buffer_size(int sk) socklen_t optlen = sizeof(size); if (getsockopt(sk, SOL_SOCKET, SO_SNDBUF, &size, &optlen) < 0) { - int err = -errno; - error("getsockopt(SO_SNDBUF) failed: %s (%d)", strerror(-err), - -err); - return err; + error("getsockopt(SO_SNDBUF) failed: %s (%d)", strerror(errno), + errno); + return -errno; } /* @@ -792,10 +791,9 @@ static int set_send_buffer_size(int sk, int size) socklen_t optlen = sizeof(size); if (setsockopt(sk, SOL_SOCKET, SO_SNDBUF, &size, optlen) < 0) { - int err = -errno; - error("setsockopt(SO_SNDBUF) failed: %s (%d)", strerror(-err), - -err); - return err; + error("setsockopt(SO_SNDBUF) failed: %s (%d)", strerror(errno), + errno); + return -errno; } return 0; -- 1.8.3.2