Date: Mon, 6 Dec 2021 00:27:59 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 9cb9ecafac37 - stable/13 - libc/net/nscachedcli.c: remove write-only variables Message-ID: <202112060027.1B60RxKG084687@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9cb9ecafac3770b574f8cbc86cd349b04db47a7d commit 9cb9ecafac3770b574f8cbc86cd349b04db47a7d Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-11-28 03:57:12 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112060027.1B60RxKG084687>