git: 9c390bd8829c - stable/14 - tcp: minor cleanup

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sun, 14 Sep 2025 20:35:36 UTC
The branch stable/14 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=9c390bd8829cef80ed276870e1117a93e8e9dfef

commit 9c390bd8829cef80ed276870e1117a93e8e9dfef
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-09-10 19:46:24 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-09-14 20:35:02 +0000

    tcp: minor cleanup
    
    No functional change intended.
    
    Sponsored by:   Netflix, Inc.
    
    (cherry picked from commit c3d5387a7bd814a6c341902c29a3f8aaa956fadb)
---
 sys/netinet/tcp_subr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 6a9a4635cee7..4a270ed07d08 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -692,14 +692,14 @@ out:
 static int
 sysctl_net_inet_default_tcp_functions(SYSCTL_HANDLER_ARGS)
 {
-	int error = ENOENT;
 	struct tcp_function_set fs;
 	struct tcp_function_block *blk;
+	int error;
 
-	memset(&fs, 0, sizeof(fs));
+	memset(&fs, 0, sizeof(struct tcp_function_set));
 	rw_rlock(&tcp_function_lock);
 	blk = find_tcp_fb_locked(V_tcp_func_set_ptr, NULL);
-	if (blk) {
+	if (blk != NULL) {
 		/* Found him */
 		strcpy(fs.function_set_name, blk->tfb_tcp_block_name);
 		fs.pcbcnt = blk->tfb_refcnt;