Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jun 2019 22:27:09 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r348820 - stable/11/sys/contrib/ipfilter/netinet
Message-ID:  <201906082227.x58MR9Dp093501@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sat Jun  8 22:27:09 2019
New Revision: 348820
URL: https://svnweb.freebsd.org/changeset/base/348820

Log:
  MFC r348311:
  
  Fix indentation and while at it simplfy the code.
  
  Reported by:	lwhsu@
  Approved by:	re (gjb@)

Modified:
  stable/11/sys/contrib/ipfilter/netinet/fil.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c
==============================================================================
--- stable/11/sys/contrib/ipfilter/netinet/fil.c	Sat Jun  8 22:25:47 2019	(r348819)
+++ stable/11/sys/contrib/ipfilter/netinet/fil.c	Sat Jun  8 22:27:09 2019	(r348820)
@@ -4982,16 +4982,16 @@ frrequest(softc, unit, req, data, set, makecopy)
 			error = ipf_outobj(softc, data, fp, IPFOBJ_FRENTRY);
 
 			if (error == 0) {
-				if ((f->fr_dsize != 0) && (uptr != NULL))
+				if ((f->fr_dsize != 0) && (uptr != NULL)) {
 					error = COPYOUT(f->fr_data, uptr,
 							f->fr_dsize);
-					if (error != 0) {
+					if (error == 0) {
+						f->fr_hits = 0;
+						f->fr_bytes = 0;
+					} else {
 						IPFERROR(28);
 						error = EFAULT;
 					}
-				if (error == 0) {
-					f->fr_hits = 0;
-					f->fr_bytes = 0;
 				}
 			}
 		}



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