summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_kern.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-04-13 00:23:42 +0000
committeralc <alc@FreeBSD.org>2003-04-13 00:23:42 +0000
commit032292ec513eab1ea1029d80f3f09c74735cc95f (patch)
treeaff8e5fff45018d17c6b68d583af4ba1a5b0243c /sys/vm/vm_kern.c
parent7e8e873c9e074e49845568df16111276e1c154a7 (diff)
downloadFreeBSD-src-032292ec513eab1ea1029d80f3f09c74735cc95f.zip
FreeBSD-src-032292ec513eab1ea1029d80f3f09c74735cc95f.tar.gz
Eliminate unnecessary gotos from kmem_malloc().
Diffstat (limited to 'sys/vm/vm_kern.c')
-rw-r--r--sys/vm/vm_kern.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index 16686c9..e7bf945 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -333,12 +333,12 @@ kmem_malloc(map, size, flags)
printf("Out of mbuf address space!\n");
printf("Consider increasing NMBCLUSTERS\n");
}
- goto bad;
+ return (0);
}
if ((flags & M_NOWAIT) == 0)
panic("kmem_malloc(%ld): kmem_map too small: %ld total allocated",
(long)size, (long)map->size);
- goto bad;
+ return (0);
}
offset = addr - VM_MIN_KERNEL_ADDRESS;
vm_object_reference(kmem_object);
@@ -399,7 +399,7 @@ retry:
vm_object_unlock(kmem_object);
vm_map_delete(map, addr, addr + size);
vm_map_unlock(map);
- goto bad;
+ return (0);
}
if (flags & M_ZERO && (m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
@@ -445,9 +445,6 @@ retry:
vm_map_unlock(map);
return (addr);
-
-bad:
- return (0);
}
/*
OpenPOWER on IntegriCloud