From nobody Fri Jan 17 07:28:21 2025 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 4YZBD608WYz5kbMt; Fri, 17 Jan 2025 07:28:22 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YZBD56ZTNz41CQ; Fri, 17 Jan 2025 07:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737098901; 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=D01kJesutVPDn7mxht/9KStaJkH93BuI6Netb6e8azo=; b=YPNIVepP3FQBewDKdKW+NUwX90/PtD9WRQt/V/WvZrcfwPPgH98J97ROpYzBjT6xFBFCgs hdj9EXFp2tiYw7rUxiKI3cLz26Oallv6nr3H+gP4WlP38DDcOjKs/apXxEfTGMRvxoV5ia ldIXjbRNrzhWCddruE49cTPfaOOin27GtkdSn45Ihfl6vtRo54BB46twP/qDMYmKr9iJ6P hI3VdIkBThWV+MkmyeQGMWQQP7xnNLywIZo1SLftyF8fPwu7I9P1cbPNyHXhIm64NwWkVx p3YYSIKcVGjTplHOVkTnt03RGCQ3RhlbyXLMzUkQC5Z3E9vTV+L4dSf/l5RA2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737098901; 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=D01kJesutVPDn7mxht/9KStaJkH93BuI6Netb6e8azo=; b=eHNZ92MW76py4CtcmwKHezE7Rd2x0phX4L8Nv9VksOM6+JA1X+tV2RkrHKRwwFvH6yao4j eBXgL4MlVOjuJAFswcUnZF4VnC1O8zSXExCsILuIZpap+c+l1psH2gMVCp6rrixeDwj2tt m5PkfI2A/CMHbQ5sk6OspqooRPp1Mpv5VjbAsuDLakoWXCg3RifS5P74ZtCs2U1FlgI+XB rUyz5Isc38FDrrW1xL898sHaUTMisKRIiK+YxCQ1KwxKxuCxWnB/HiKUGLBVZ3GVY86QIE edIgt5uH/EguXjXK2b/yjtV3EF/P/MaH+kLLTALJipof/2kf3BiySIctiv1KIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737098901; a=rsa-sha256; cv=none; b=EROD2WY15grF/p6u/Ane7htFj58iAnb+X+x5vIiKh3JQlWg92G3bAAvVHIrS2Dz/p5RjUE AdNXkYZUSk5Uc9eRL+nKfPf7zibZYVjlCXyGje0vFhBPZJ/COy9eVaPSgOVEYlRg/UAdHC TwAWHwM1vG+0Mb8QNbGbcTN6vJV55+GlOxL/c4mwNJ/uZxGcxRlmyujmJ8XpUf9V+XpAvl r1lbtQ6T49718shyjdGh8pK8Xd5TUuXLDcH4IUG21sYN/IrvN5NJhsc9uRbRXJ9WFeSiLj hjBZLVUHAJnNklZI6RBM/P0wm+gFmRbR7vUJldokTI7f3GfIev2mImXoE/qDCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YZBD55sMmz16Pt; Fri, 17 Jan 2025 07:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50H7SLnf091896; Fri, 17 Jan 2025 07:28:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50H7SLbU091893; Fri, 17 Jan 2025 07:28:21 GMT (envelope-from git) Date: Fri, 17 Jan 2025 07:28:21 GMT Message-Id: <202501170728.50H7SLbU091893@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: 9d04973b4adc - main - krpc/clnt_vc: remove always false check 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9d04973b4adc1b6312043fc313e4bf2c85593904 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9d04973b4adc1b6312043fc313e4bf2c85593904 commit 9d04973b4adc1b6312043fc313e4bf2c85593904 Author: Gleb Smirnoff AuthorDate: 2025-01-17 03:52:34 +0000 Commit: Gleb Smirnoff CommitDate: 2025-01-17 07:27:21 +0000 krpc/clnt_vc: remove always false check We just initialized ct_closeit to false a few lines above. --- sys/rpc/clnt_vc.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c index 91556dddebaa..2f2674e694af 100644 --- a/sys/rpc/clnt_vc.c +++ b/sys/rpc/clnt_vc.c @@ -234,12 +234,8 @@ clnt_vc_create( */ xdrmem_create(&xdrs, ct->ct_mcallc, MCALL_MSG_SIZE, XDR_ENCODE); - if (! xdr_callhdr(&xdrs, &call_msg)) { - if (ct->ct_closeit) { - soclose(ct->ct_socket); - } + if (! xdr_callhdr(&xdrs, &call_msg)) goto err; - } ct->ct_mpos = XDR_GETPOS(&xdrs); XDR_DESTROY(&xdrs); ct->ct_waitchan = "rpcrecv"; @@ -252,12 +248,8 @@ clnt_vc_create( sendsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsz); recvsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)recvsz); error = soreserve(ct->ct_socket, sendsz, recvsz); - if (error != 0) { - if (ct->ct_closeit) { - soclose(ct->ct_socket); - } + if (error != 0) goto err; - } cl->cl_refs = 1; cl->cl_ops = &clnt_vc_ops; cl->cl_private = ct;