From nobody Mon Jun 12 14:49:40 2023 X-Original-To: dev-commits-src-all@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 4QfvjJ6pqmz4cWJ4; Mon, 12 Jun 2023 14:49:40 +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 4QfvjJ6Pzyz4LGY; Mon, 12 Jun 2023 14:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686581380; 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=9pP08RmGKTFgku+M2uwayt+LoEAuw3G1dZWH58J2KxI=; b=tkikRESueOKWib3Lo2hfkB/f9QwxQdjOBhX+CNGxdDOw9sMqj8i5L5zGu2KkCkuXbZNQ/g lou9YEye6q9x33Xm8KiulSiL88w57IFR/km3Pk4W5m3KgG7D0bzUKcc6PsZdWPoiDKSID2 N4zRwl6s4lWdUSMaHLH6oosmDydcVDHnPcNXObIOfDZdEPyvjekbiKDmqn8+jQmSHEZVx6 zqnk9QtfwGQakdsIV7nFA0gY1Sg75WOi3nxSGFkspZkNDuly3J6ch3Tmfiz8d0LHyuC0ZE yZW6Q71P5/Oq3eZ8aQFvpAQmbXG5aSkt7CljEj7Nr9wXdLGPQBuv0PL/TT69rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686581380; 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=9pP08RmGKTFgku+M2uwayt+LoEAuw3G1dZWH58J2KxI=; b=sgPMN1NWHE2o/PY2IMbAUsUan3b63vUmVay1Uc3xd2YwJrv8XLPVE6at+DTegrcDn0KhNr uk2ctgi3SDI9nEzjvuji84c9sCU/J+flYXV7x7VZtCBISTIc8+dywEdfId47UouFge/z7Q HwW161NCNY6z32MyJPEWkmwKn2gpPxZMfvz1R/Iw4/rQ/nk20m7z2G3boYMrUZetW5/YC4 XnZLXZvE7V3FpvMzSeiDRnz3mEXCQmrt5MgEGvcdz0sGXetnwkna9yihZYYi2CewFjIRUu M+oz4ocDWGvxaEDiGuwkBj3C5VLKiQs1oJSKbUQW4EseWvL9yJ8LoeSvMEhHVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686581380; a=rsa-sha256; cv=none; b=Jj932smbvfBR8EoZ0bf8fKvty4D4Lyxl4WzKa+69kW4uAVKo/BgIyM9sqTRaY8+HP5V2q1 CYLQ4oDp7NzxN7/OlDZhjFraIMKGxVSYC6q/T1qmm+b1RJRsPr7QzVygi4+gi1L0XGuK7m CQKvnnjRdCpZ4mKwLWCtVQPAtedh+xlz1RiTejY2/VrRXbAFxnonhmMihe2T60TD3hgPJQ tpyYArptsLacyANHUxPkgoEdbayoah4VdeKcCYX9HPOZoKNddijYuuCSYeBlkPDAtpn+hV 3vY45VtWqNXrgRdp01BdxCx1x7ktwB396jkZ0ip7FaH3jK9Kv30I+Xm0DzXeVA== 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 4QfvjJ5Sm0zkY9; Mon, 12 Jun 2023 14:49:40 +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 35CEneJj079984; Mon, 12 Jun 2023 14:49:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35CEnegR079983; Mon, 12 Jun 2023 14:49:40 GMT (envelope-from git) Date: Mon, 12 Jun 2023 14:49:40 GMT Message-Id: <202306121449.35CEnegR079983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6016aedba1e3 - main - uipc_syscalls: removed unnecessary check in accept1() function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6016aedba1e3701c7c12459effe55e84d7a18b1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6016aedba1e3701c7c12459effe55e84d7a18b1e commit 6016aedba1e3701c7c12459effe55e84d7a18b1e Author: Dmitriy Alexandrov AuthorDate: 2023-06-12 14:44:08 +0000 Commit: Warner Losh CommitDate: 2023-06-12 14:49:13 +0000 uipc_syscalls: removed unnecessary check in accept1() function Signed-off-by: Dmitriy Alexandrov Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/773 --- sys/kern/uipc_syscalls.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 496e93d76bb0..0d3581eacca9 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -298,15 +298,13 @@ accept1(struct thread *td, int s, struct sockaddr *uname, socklen_t *anamelen, if (error != 0) return (error); - if (error == 0 && uname != NULL) { #ifdef COMPAT_OLDSOCK - if (SV_PROC_FLAG(td->td_proc, SV_AOUT) && - (flags & ACCEPT4_COMPAT) != 0) - ((struct osockaddr *)name)->sa_family = - name->sa_family; + if (SV_PROC_FLAG(td->td_proc, SV_AOUT) && + (flags & ACCEPT4_COMPAT) != 0) + ((struct osockaddr *)name)->sa_family = + name->sa_family; #endif - error = copyout(name, uname, namelen); - } + error = copyout(name, uname, namelen); if (error == 0) error = copyout(&namelen, anamelen, sizeof(namelen));