diff options
| author | 2002-10-29 18:30:21 +0000 | |
|---|---|---|
| committer | 2002-10-29 18:30:21 +0000 | |
| commit | 93cbfefa847e712438e489eed16a4a5aa0e721e9 (patch) | |
| tree | 384c5ada353ead0b220db134e622a4e263e371ba /sys/kern/sysv_shm.c | |
| parent | danger will robinson, danger (diff) | |
| download | wireguard-openbsd-93cbfefa847e712438e489eed16a4a5aa0e721e9.tar.xz wireguard-openbsd-93cbfefa847e712438e489eed16a4a5aa0e721e9.zip | |
Since memory deallocation can't fail, remove the error return from
uvm_unmap, uvm_deallocate and a few other functions.
Simplifies some code and reduces diff to the UBC branch.
Diffstat (limited to 'sys/kern/sysv_shm.c')
| -rw-r--r-- | sys/kern/sysv_shm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 2f59bc99f31..7a0aa69fcf6 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.27 2002/07/16 23:06:05 art Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.28 2002/10/29 18:30:21 art Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -144,15 +144,13 @@ shm_delete_mapping(vm, shmmap_s) struct shmmap_state *shmmap_s; { struct shmid_ds *shmseg; - int segnum, result; + int segnum; size_t size; segnum = IPCID_TO_IX(shmmap_s->shmid); shmseg = &shmsegs[segnum]; size = round_page(shmseg->shm_segsz); - result = uvm_deallocate(&vm->vm_map, shmmap_s->va, size); - if (result != KERN_SUCCESS) - return EINVAL; + uvm_deallocate(&vm->vm_map, shmmap_s->va, size); shmmap_s->shmid = -1; shmseg->shm_dtime = time.tv_sec; if ((--shmseg->shm_nattch <= 0) && |
