git: 0e00befcaf66 - main - libc/net/nscachedcli.c: remove write-only variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Nov 2021 15:43:08 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0e00befcaf6614c513fb32485ea9a2b188169bc2 commit 0e00befcaf6614c513fb32485ea9a2b188169bc2 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-11-28 03:57:12 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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); }