Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2017 15:24:18 +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: r324432 - head/sys/i386/i386
Message-ID:  <201710091524.v99FOIVR037688@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Oct  9 15:24:18 2017
New Revision: 324432
URL: https://svnweb.freebsd.org/changeset/base/324432

Log:
  More style.
  
  Reviewed by:	bde
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/i386/i386/sys_machdep.c

Modified: head/sys/i386/i386/sys_machdep.c
==============================================================================
--- head/sys/i386/i386/sys_machdep.c	Mon Oct  9 14:50:02 2017	(r324431)
+++ head/sys/i386/i386/sys_machdep.c	Mon Oct  9 15:24:18 2017	(r324432)
@@ -717,10 +717,10 @@ i386_set_ldt_data(struct thread *td, int start, int nu
 static int
 i386_ldt_grow(struct thread *td, int len) 
 {
-	struct mdproc *mdp = &td->td_proc->p_md;
+	struct mdproc *mdp;
 	struct proc_ldt *new_ldt, *pldt;
-	caddr_t old_ldt_base = NULL_LDT_BASE;
-	int old_ldt_len = 0;
+	caddr_t old_ldt_base;
+	int old_ldt_len;
 
 	mtx_assert(&dt_lock, MA_OWNED);
 
@@ -728,6 +728,10 @@ i386_ldt_grow(struct thread *td, int len) 
 		return (ENOMEM);
 	if (len < NLDT + 1)
 		len = NLDT + 1;
+
+	mdp = &td->td_proc->p_md;
+	old_ldt_base = NULL_LDT_BASE;
+	old_ldt_len = 0;
 
 	/* Allocate a user ldt. */
 	if ((pldt = mdp->md_ldt) == NULL || len > pldt->ldt_len) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710091524.v99FOIVR037688>