Date: Sun, 11 Nov 2018 00:21:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340344 - head/sys/kern Message-ID: <201811110021.wAB0LS4i074541@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Nov 11 00:21:28 2018 New Revision: 340344 URL: https://svnweb.freebsd.org/changeset/base/340344 Log: Remove one-use variable. This also removes a lot of #ifdefs and cleans up a warning when the AUDIT kernel option is defined, but neither KDTRACE_HOOKS nor MAC are. Reported and tested by: danger Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sun Nov 11 00:04:36 2018 (r340343) +++ head/sys/kern/sysv_shm.c Sun Nov 11 00:21:28 2018 (r340344) @@ -332,9 +332,6 @@ kern_shmdt_locked(struct thread *td, const void *shmad { struct proc *p = td->td_proc; struct shmmap_state *shmmap_s; -#if defined(AUDIT) || defined(MAC) - struct shmid_kernel *shmsegptr; -#endif #ifdef MAC int error; #endif @@ -355,11 +352,9 @@ kern_shmdt_locked(struct thread *td, const void *shmad } if (i == shminfo.shmseg) return (EINVAL); -#if (defined(AUDIT) && defined(KDTRACE_HOOKS)) || defined(MAC) - shmsegptr = &shmsegs[IPCID_TO_IX(shmmap_s->shmid)]; -#endif #ifdef MAC - error = mac_sysvshm_check_shmdt(td->td_ucred, shmsegptr); + error = mac_sysvshm_check_shmdt(td->td_ucred, + &shmsegs[IPCID_TO_IX(shmmap_s->shmid)]); if (error != 0) return (error); #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811110021.wAB0LS4i074541>