git: 9891cb1e7634 - main - Eliminate curlen, it's set but never used
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 27 Feb 2022 16:47:31 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9891cb1e7634940dbbf90b61ca256cdee75b441f commit 9891cb1e7634940dbbf90b61ca256cdee75b441f Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-02-24 23:32:42 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-02-27 16:02:45 +0000 Eliminate curlen, it's set but never used Sponsored by: Netflix --- sys/kern/uipc_shm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 0ee2147da122..9f556efde3f1 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -2033,12 +2033,10 @@ sysctl_posix_shm_list(SYSCTL_HANDLER_ARGS) struct sbuf sb; struct kinfo_file kif; u_long i; - ssize_t curlen; int error, error2; sbuf_new_for_sysctl(&sb, NULL, sizeof(struct kinfo_file) * 5, req); sbuf_clear_flags(&sb, SBUF_INCLUDENUL); - curlen = 0; error = 0; sx_slock(&shm_dict_lock); for (i = 0; i < shm_hash + 1; i++) { @@ -2056,7 +2054,6 @@ sysctl_posix_shm_list(SYSCTL_HANDLER_ARGS) 0 : ENOMEM; if (error != 0) break; - curlen += kif.kf_structsize; } } sx_sunlock(&shm_dict_lock);