From nobody Mon Nov 29 15:43:15 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B352F18BCC0A; Mon, 29 Nov 2021 15:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2qPf0Lblz4nNg; Mon, 29 Nov 2021 15:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 343C325289; Mon, 29 Nov 2021 15:43:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ATFhF98065976; Mon, 29 Nov 2021 15:43:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATFhFa4065975; Mon, 29 Nov 2021 15:43:15 GMT (envelope-from git) Date: Mon, 29 Nov 2021 15:43:15 GMT Message-Id: <202111291543.1ATFhFa4065975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 631607ac2965 - main - t_mlock.c: Remove null_errno, it is write-only List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 631607ac2965e8c6dcc0f21effc9b36fcb530558 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638200598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CtAAuXrTua+hg0xu5reVulDdMO1hJOMVnsQLNqUNiz0=; b=bULABgmGlhF9PF7+ypTVtSwmDj9gSsB6rqk1qJKJuY9NaruWcoxbSJKzzOsBKXGLSuKm8n LUesFXGcWFnuciWNjwSBOp/BbN2I6TfivBDoWFomHBE0n7ZFdwseKpruG4zvLumqGLPJXC 649Zf3Kj4iarvqu05f2zdTUYhJ8rllJMCgnJbERsV9e8PIe0sh9s1xV9xDo10OuhA1vXIs AR+JFLBQUNZbapOXHM8FwCmWw2qwfShq1xeNzNUeaSWjcixNl5dZFrOZ+M86tMs+iHrwAM zyJTGvAPFsEN0AZ4Y0kvR6Bb7oFjUlmxaep3JgwII5Kem+QZPeVW2YBAkfY40g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638200598; a=rsa-sha256; cv=none; b=xsSS3RaHoGFw1qD0hgvXUtcgWnMHT1GibL53OV4CBen7Pd61whMYA4GRPmXBXNb3YC8/vF oDIoH7rNTPYmmexpfxD/bOOfYgXKdewtUal/IWP08roQ+Zufx/R35GxmBqeBqwIsFjPzbc 2F+gkTC8StB5sTImZrav+Lnu4OE3EUf254EjkBJGYdVpiXXM2makqX/t7iZf8b6ScnkFHI y9MO3LrUR8H5t6Q4zf5Dc8wCYgtgZaot+cT71uaQpPaU0SCMofyywpIWmaCbOUdE+CmyWL gC/E8nZFMvUsYR6eovRM1ty+QYp8oyzzZKTY3tuU3NhbQRciDvKii98TMJtT6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=631607ac2965e8c6dcc0f21effc9b36fcb530558 commit 631607ac2965e8c6dcc0f21effc9b36fcb530558 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:28:29 +0000 Commit: Konstantin Belousov 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;