The branch main has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=631607ac2965e8c6dcc0f21effc9b36fcb530558

commit 631607ac2965e8c6dcc0f21effc9b36fcb530558
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2021-11-28 03:28:29 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2021-11-29 15:39:51 +0000

    t_mlock.c: Remove null_errno, it is write-only
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 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;

Reply via email to