Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Dec 2021 19:00:16 GMT
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c735ca3b1f8c - stable/12 - ipfilter: Save a word of stack space
Message-ID:  <202112091900.1B9J0G3w053392@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by cy:

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

commit c735ca3b1f8c839b40fb6d92742a211c006f5b90
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-10-04 18:36:15 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-12-09 18:52:10 +0000

    ipfilter: Save a word of stack space
    
    Rather than save the return code into an intermediate variable, which BTW
    is optimized out anyway, explicitly remove the return code from the stack.
    
    (cherry picked from commit b7f127b6e5f9febff895da9230c3269dfcd971c2)
---
 sys/contrib/ipfilter/netinet/ip_ftp_pxy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
index f4b40f3601d9..0079e884a8b8 100644
--- a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
+++ b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
@@ -1258,15 +1258,13 @@ ipf_p_ftp_valid(softf, ftp, side, buf, len)
 	size_t len;
 {
 	ftpside_t *ftps;
-	int ret;
 
 	ftps = &ftp->ftp_side[side];
 
 	if (side == 0)
-		ret = ipf_p_ftp_client_valid(softf, ftps, buf, len);
+		return(ipf_p_ftp_client_valid(softf, ftps, buf, len));
 	else
-		ret = ipf_p_ftp_server_valid(softf, ftps, buf, len);
-	return ret;
+		return(ipf_p_ftp_server_valid(softf, ftps, buf, len));
 }
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112091900.1B9J0G3w053392>