git: 2cb7a2282312 - stable/13 - t_mlock.c: Remove null_errno, it is write-only
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Dec 2021 00:28:06 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2cb7a2282312253ee20497b4da197e8f072a4bc7 commit 2cb7a2282312253ee20497b4da197e8f072a4bc7 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-11-28 03:28:29 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-12-06 00:23:45 +0000 t_mlock.c: Remove null_errno, it is write-only (cherry picked from commit 631607ac2965e8c6dcc0f21effc9b36fcb530558) --- contrib/netbsd-tests/lib/libc/sys/t_mlock.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c index 61085f35cc21..d9ffbe366a04 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c @@ -106,14 +106,9 @@ ATF_TC_BODY(mlock_err, tc) #if !defined(__aarch64__) && !defined(__riscv) void *invalid_ptr; #endif - int null_errno = ENOMEM; /* error expected for NULL */ void *buf; #ifdef __FreeBSD__ -#ifdef VM_MIN_ADDRESS - if ((uintptr_t)VM_MIN_ADDRESS > 0) - null_errno = EINVAL; /* NULL is not inside user VM */ -#endif /* Set max_wired really really high to avoid EAGAIN */ set_vm_max_wired(INT_MAX); #else @@ -124,9 +119,6 @@ ATF_TC_BODY(mlock_err, tc) */ errno = 0; ATF_REQUIRE_ERRNO(ENOMEM, mlock(NULL, page) == -1); - - if (vmin > 0) - null_errno = EINVAL; /* NULL is not inside user VM */ #endif errno = 0;