From nobody Mon Mar 11 14:53:19 2024 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 4TtfsW5GqYz5D7Hj; Mon, 11 Mar 2024 14:53: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 4TtfsW44jdz4SMr; Mon, 11 Mar 2024 14:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710168799; 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=LrD+bvk7M/oW4KkS7olVg3Fj/FRPdIupZ61nhHI8Ztk=; b=Qw/gOTNDITAfq6yHEPfxj3u7j0Lx5t53Yp2gsJ51ajPSDSgPuWshWiguzolVMaf4ERPPyz 9febH/Xy5Qe3tvPa45kygWY2CNn+d7vpZw/uSPkdM/AvFXkPsIPR9Odg+p2Pzfjio5kWQO kPoQ8dLFPatOkK65YUPgBaV1NyyeYdrRTqF8NqkL2RFMi0XricVGSCn4UxVSzRhjM4MNyp 1qxxCyJk7VbaDodLhOHrQiVvm+nInIgGI/3W2G/X5CCNL7zdpA7CLboT7aMwmMP5csG/dW 6eTiNPIWFaZOQPhNTniPALSiye/AeRx9bVFAeevU4VB5LfIhdPyW29/1u4T+hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710168799; a=rsa-sha256; cv=none; b=bwvu/EaCl9Y2xxJ3vMLntBxOIehzj236dseTkoHyRDTzBCBiLtR5Ff9+2PVTXkfrqu2UQ5 j5iRGh6L/HL24ATso46/KmFh8UwfjUuzZ/iS6qhjfGQc5kGCNDcy/ntzgMy+1Y4WUiYVWA 0IA4PcWhi6izlkWBCboQqCahBVjdYF8cvF0of2IykFVX8qccQ+m3gKnB2dAreyQ7UDZpRg ZOURNVWne98EP65vKRq0UzxLbHcY71Ua/KSjqP3XOGHCpyEZk6HUJMxoN1jXy8OBl33amU frEmWiOUhwhEXzNmpke9aljTJuZbAEPTWAG3Ke00eJ/DExSoZBEtiTBLjynDnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710168799; 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=LrD+bvk7M/oW4KkS7olVg3Fj/FRPdIupZ61nhHI8Ztk=; b=Y9JbyiwAyRXdNUfmt9vUKPuT0cnfMkxTVLnowux0cwSxIJX4kr5EWZ7Neo3sAo70xMNCqA L1d2xr3ijXSWReXpwzJ75lXOdVr7obXJ8vLpsaJgfLVilzQQwVn6CUWhUFIgh4f02zrHln I2Fs781OIoqDLWPvZVw4K2AvDf6AD/4Zh4di4kSk3d3G/e6Aj+vWVv/zZ1244y391XMVLI 1nfsCkR2hOZm5BNfZ5qeq5N/xPaLg8DSOJdCGeYGWLbSnvz7ng4m4L/wd/qKSWFdX8OzLk yY1AF/pVAtq3k72STA6lgVTM7YCGM/b8QiXMNsaUNCAvF0Supw3NeAQOoIUFlQ== 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 4TtfsW3gryzZHc; Mon, 11 Mar 2024 14:53:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BErJ3k064423; Mon, 11 Mar 2024 14:53:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BErJ6E064420; Mon, 11 Mar 2024 14:53:19 GMT (envelope-from git) Date: Mon, 11 Mar 2024 14:53:19 GMT Message-Id: <202403111453.42BErJ6E064420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 55951611e49a - main - tests/unix_seqpacket: mk_pair_of_sockets() requires a valid argument 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55951611e49a5a43ba151582505019c38558c0e7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=55951611e49a5a43ba151582505019c38558c0e7 commit 55951611e49a5a43ba151582505019c38558c0e7 Author: Gleb Smirnoff AuthorDate: 2024-03-11 14:50:29 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 14:50:29 +0000 tests/unix_seqpacket: mk_pair_of_sockets() requires a valid argument All callers do it right. Don't be overprotective against a stupid caller and thus don't look like a code that leaks a resource. Reported by: Coverity Scan CID: 1539210 --- tests/sys/kern/unix_seqpacket_test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index e93bdfe7e0b1..ca3fcdef9e6a 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -124,10 +124,8 @@ mk_pair_of_sockets(int *sv) atf_tc_fail("accept(2) failed"); } - if (sv != NULL) { - sv[0] = s1; - sv[1] = s2; - } + sv[0] = s1; + sv[1] = s2; close(s);