summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-12-30 19:26:23 +0000
committerjhb <jhb@FreeBSD.org>2004-12-30 19:26:23 +0000
commit5624553de421f01520096aaaedc63434e38c8e31 (patch)
treed5dd11403df36e3a855fdce1dbb2deb3adeef957 /sys/i386
parenta610dc93b76ce2560e83731cc4e56baa53fcfe13 (diff)
downloadFreeBSD-src-5624553de421f01520096aaaedc63434e38c8e31.zip
FreeBSD-src-5624553de421f01520096aaaedc63434e38c8e31.tar.gz
Use NULL instead of 0 in a few places as well as various whitespace fixes.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/sys_machdep.c10
-rw-r--r--sys/i386/i386/vm_machdep.c14
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index cc31798..9aeb050 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -416,7 +416,7 @@ i386_set_ldt(td, args)
int error = 0, i;
int largest_ld;
struct mdproc *mdp = &td->td_proc->p_md;
- struct proc_ldt *pldt = 0;
+ struct proc_ldt *pldt = NULL;
struct i386_ldt_args ua, *uap = &ua;
union descriptor *descs, *dp;
int descs_size;
@@ -435,7 +435,7 @@ i386_set_ldt(td, args)
/*
* Treat this as a special case, so userland needn't
* know magic number NLDT.
- */
+ */
uap->start = NLDT;
uap->num = MAX_LD - NLDT;
}
@@ -555,7 +555,7 @@ i386_set_ldt(td, args)
/* Allocate a free slot */
pldt = mdp->md_ldt;
if (pldt == NULL) {
- error = i386_ldt_grow(td, NLDT+1);
+ error = i386_ldt_grow(td, NLDT + 1);
if (error) {
kmem_free(kernel_map, (vm_offset_t)descs,
descs_size);
@@ -630,8 +630,8 @@ i386_ldt_grow(struct thread *td, int len)
if (len > MAX_LD)
return (ENOMEM);
- if (len < NLDT+1)
- len = NLDT+1;
+ if (len < NLDT + 1)
+ len = NLDT + 1;
pldt = mdp->md_ldt;
/* allocate user ldt */
if (!pldt || len > pldt->ldt_len) {
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 06da6e3..cc98727 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -242,9 +242,9 @@ cpu_fork(td1, p2, td2, flags)
*/
pcb2->pcb_ext = 0;
- /* Copy the LDT, if necessary. */
+ /* Copy the LDT, if necessary. */
mtx_lock_spin(&sched_lock);
- if (mdp2->md_ldt != 0) {
+ if (mdp2->md_ldt != NULL) {
if (flags & RFMEM) {
mdp2->md_ldt->ldt_refcnt++;
} else {
@@ -253,7 +253,7 @@ cpu_fork(td1, p2, td2, flags)
if (mdp2->md_ldt == NULL)
panic("could not copy LDT");
}
- }
+ }
mtx_unlock_spin(&sched_lock);
/*
@@ -316,11 +316,11 @@ cpu_thread_exit(struct thread *td)
if (td == PCPU_GET(fpcurthread))
npxdrop();
#endif
- if (pcb->pcb_flags & PCB_DBREGS) {
+ if (pcb->pcb_flags & PCB_DBREGS) {
/* disable all hardware breakpoints */
- reset_dbregs();
- pcb->pcb_flags &= ~PCB_DBREGS;
- }
+ reset_dbregs();
+ pcb->pcb_flags &= ~PCB_DBREGS;
+ }
}
void
OpenPOWER on IntegriCloud