t_mlock.c: Remove null_errno, it is write-only
Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
c8a4a49d58
commit
631607ac29
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user