From nobody Mon Dec 06 00:27:59 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B968318BE378; Mon, 6 Dec 2021 00:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J6kmJ1Gzjz4XQk; Mon, 6 Dec 2021 00:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8E13218C7; Mon, 6 Dec 2021 00:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B60RxUi084688; Mon, 6 Dec 2021 00:27:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B60RxKG084687; Mon, 6 Dec 2021 00:27:59 GMT (envelope-from git) Date: Mon, 6 Dec 2021 00:27:59 GMT Message-Id: <202112060027.1B60RxKG084687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 9cb9ecafac37 - stable/13 - libc/net/nscachedcli.c: remove write-only variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9cb9ecafac3770b574f8cbc86cd349b04db47a7d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638750480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i3fDH4uVh5QajE24DBTbpItSsDi93EbcahX0zjwneB8=; b=Ryt/Q7FtBmQopOq4UjuDFEZKRr/P1NbHIQAOEa26tLdF1m09YLp29gXi1cBuN/aKsz7Iyg MPvRfF3EYBiQlDoGXyBfqDvlWRfX7KGQ03Y9YeWs2qWCQVcXr+/9Boo+7Bsyp0Y77OdaMe cG2jFKPihnsB1UagmtpSylzGRc1MNuQ/JDG7QkQb/hxrKFEQ1qQg0zDsDOd/oi1BZQZfsi rvhY1SX/GZVSIuUknVZ6i+Lh7r6u2hdppviiYb3O9ksdPCk32HzV2kFhBS3cO8vorhdh/l LBjcVFEXufb/ibn3DcG0Dcm3ByiWyaejaedTCqykNQiHwxuCBXZndB09R1nHZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638750480; a=rsa-sha256; cv=none; b=rRM25OAHxlo2cYeTZGMZ658YSxz030TujdzCJ+ZAJs2IAQpzevekcvOb5aXjCTt1EMBdr5 sVqAqCyAxSsmbu9dBrTZ3Cd9hnSC7h1mCBLu55tSqQU2t6JfOZZQFmc9IYhDIzFTWIW/J3 Q7V5ys8UelTePrNIq26FKBrSJ9D4hlZwCBXMketgNu+zySxD/jlE5C/gUMrK/YfbHqRFvn +aptCXpniM/3CfwEVJ7maUIfRN/75R3CbwmS5O6YQVW/mJwjiZho29FH4oZS0ElTYdDkN0 1Xz4nt6cHXQvcI0GoIyeNRzCrburpYKZoHHFLKTyOpPQz5b6KlD8U14siSByDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9cb9ecafac3770b574f8cbc86cd349b04db47a7d commit 9cb9ecafac3770b574f8cbc86cd349b04db47a7d Author: Konstantin Belousov AuthorDate: 2021-11-28 03:57:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-06 00:23:44 +0000 libc/net/nscachedcli.c: remove write-only variables (cherry picked from commit 0e00befcaf6614c513fb32485ea9a2b188169bc2) --- lib/libc/net/nscachedcli.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libc/net/nscachedcli.c b/lib/libc/net/nscachedcli.c index 53f69dda7fbb..2acc12af2d1e 100644 --- a/lib/libc/net/nscachedcli.c +++ b/lib/libc/net/nscachedcli.c @@ -153,7 +153,6 @@ send_credentials(struct cached_connection_ *connection, int type) struct kevent eventlist; int nevents; ssize_t result; - int res; memset(&cmsg, 0, sizeof(cmsg)); cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(struct cmsgcred)); @@ -171,7 +170,7 @@ send_credentials(struct cached_connection_ *connection, int type) EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD, NOTE_LOWAT, sizeof(int), NULL); - res = _kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); + (void)_kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); nevents = _kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL); @@ -474,10 +473,9 @@ int __close_cached_mp_write_session(struct cached_connection_ *ws) { int notification; - int result; notification = CET_MP_WRITE_SESSION_CLOSE_NOTIFICATION; - result = safe_write(ws, ¬ification, sizeof(int)); + (void)safe_write(ws, ¬ification, sizeof(int)); __close_cached_connection(ws); return (0); }