git: 8d9bc45628bb - stable/12 - MFC ddce63fcb6d0: Remove not needed variable initialization. And switch from int to bool while at it.

Hans Petter Selasky hselasky at FreeBSD.org
Tue Jan 12 16:42:51 UTC 2021


The branch stable/12 has been updated by hselasky:

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

commit 8d9bc45628bbb7200dd5e41e3a44119405307842
Author:     Hans Petter Selasky <hselasky at FreeBSD.org>
AuthorDate: 2020-12-23 10:37:44 +0000
Commit:     Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2021-01-12 16:41:39 +0000

    MFC ddce63fcb6d0:
    Remove not needed variable initialization.
    And switch from int to bool while at it.
    
    Reviewed by:    melifaro@
    Differential Revision:  https://reviews.freebsd.org/D27725
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 sys/net/if_ethersubr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 9591d9f1ebcc..532d6a7a342b 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -289,7 +289,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
 	char linkhdr[ETHER_HDR_LEN], *phdr;
 	struct ether_header *eh;
 	struct pf_mtag *t;
-	int loop_copy = 1;
+	bool loop_copy;
 	int hlen;	/* link layer header length */
 	uint32_t pflags;
 	struct llentry *lle = NULL;
@@ -359,7 +359,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
 		update_mbuf_csumflags(m, m);
 		return (if_simloop(ifp, m, dst->sa_family, 0));
 	}
-	loop_copy = pflags & RT_MAY_LOOP;
+	loop_copy = (pflags & RT_MAY_LOOP) != 0;
 
 	/*
 	 * Add local net header.  If no space in first mbuf,


More information about the dev-commits-src-branches mailing list