diff options
author | alc <alc@FreeBSD.org> | 2003-04-13 00:23:42 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-04-13 00:23:42 +0000 |
commit | 032292ec513eab1ea1029d80f3f09c74735cc95f (patch) | |
tree | aff8e5fff45018d17c6b68d583af4ba1a5b0243c /sys/vm/vm_kern.c | |
parent | 7e8e873c9e074e49845568df16111276e1c154a7 (diff) | |
download | FreeBSD-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.c | 9 |
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); } /* |