Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Nov 2018 09:45:53 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r340548 - stable/12/sys/kern
Message-ID:  <201811180945.wAI9jrYZ075672@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Nov 18 09:45:52 2018
New Revision: 340548
URL: https://svnweb.freebsd.org/changeset/base/340548

Log:
  MFC r340344:
  Remove single-use variable, cleanup warnings.

Modified:
  stable/12/sys/kern/sysv_shm.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/sysv_shm.c
==============================================================================
--- stable/12/sys/kern/sysv_shm.c	Sun Nov 18 01:58:48 2018	(r340547)
+++ stable/12/sys/kern/sysv_shm.c	Sun Nov 18 09:45:52 2018	(r340548)
@@ -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?201811180945.wAI9jrYZ075672>