git: 9d04973b4adc - main - krpc/clnt_vc: remove always false check
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jan 2025 07:28:21 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=9d04973b4adc1b6312043fc313e4bf2c85593904
commit 9d04973b4adc1b6312043fc313e4bf2c85593904
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-01-17 03:52:34 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
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;