The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=55951611e49a5a43ba151582505019c38558c0e7

commit 55951611e49a5a43ba151582505019c38558c0e7
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2024-03-11 14:50:29 +0000
Commit:     Gleb Smirnoff <[email protected]>
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);
 

Reply via email to