From nobody Mon Nov 29 15:43:08 2021 X-Original-To: dev-commits-src-main@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 539D518BC6DA; Mon, 29 Nov 2021 15:43:11 +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 4J2qPT1Rqfz4nWk; Mon, 29 Nov 2021 15:43:09 +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 5E36E25236; Mon, 29 Nov 2021 15:43:08 +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 1ATFh8wW065826; Mon, 29 Nov 2021 15:43:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFh8Yt065825; Mon, 29 Nov 2021 15:43:08 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:08 GMT Message-Id: <202111291543.1ATFh8Yt065825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0e00befcaf66 - main - libc/net/nscachedcli.c: remove write-only variables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 0e00befcaf6614c513fb32485ea9a2b188169bc2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200590; 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=LYYOqwHHigAG0LLniH3v+ncUdxjgqjZ/mBUqEQy/eXE=; b=RMlpdnldR1Ss7dhJoxYjeNT/X54+spDZhRVT7Cc4yEXYxfbcJscdF/zAVL93sCenMxgizJ 4V8/nAiPQE+WJmPJ5HLX9b7Poj4Zn5bh41feAoCq348ifuSEKncdy5udQCkjHZ6gfuoDrX xpCaG266aFo4iYDs+/POnUNbjW6UArrNjhRPWGRtBfShE1JsQFLTLPh6fWlrbRvEJSghh5 AP2NdLgSHek1AUjeUbJKlK3FbJaER+LM/EKQ/eQRdgwpNf6UvO9GjTmWr3SyQ4NVjAwTLd 3m47neaLlTUOHwoRVR2K+EPqG8TQzt9bv6qAgDcOY0yb/PljYZ316iLObKB/dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200590; a=rsa-sha256; cv=none; b=r77RTdD7jbH8L7ZX+ljUcNp9zawvbvd+dL/HQNrLIpQtUv9kKgDSwlu4azIZT6oeO9dpto X0lDROfLFIHlPzoYQp6D4/SFoCQPF7qpfZKjDRZnjUA87rg2THGMP/7ZXYkGvUbBvIrJqD frQTW/mQRDpWz9NL2FcOml5L2le2USv8v87HZJ0FwGYqCxtp49CS3+mnlvHeUTTo89lsKm no6PidS7tdnGB15GaV+zLT9rC9qZPGOnDqqc2PJpY569dRDC4hM4PphEREXu2DQIO/7h/p LxmE9HtNOuvVf+dsZlb5ariOyFuc9oHTqbJynRXK/flMBBLE9HYNBz8nJzq7Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0e00befcaf6614c513fb32485ea9a2b188169bc2 commit 0e00befcaf6614c513fb32485ea9a2b188169bc2 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:57:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-11-29 15:39:50 +0000 libc/net/nscachedcli.c: remove write-only variables Sponsored by: The FreeBSD Foundation MFC after: 1 week --- 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); }