svn commit: r298733 - head/sys/netinet
Pedro F. Giffuni
pfg at FreeBSD.org
Thu Apr 28 02:46:09 UTC 2016
Author: pfg
Date: Thu Apr 28 02:46:08 2016
New Revision: 298733
URL: https://svnweb.freebsd.org/changeset/base/298733
Log:
ipdivert: Remove unnecessary and incorrectly typed variable.
In principle n is only used to carry a copy of ipi_count, which is
unsigned, in the non-VIMAGE case, however ipi_count can be used
directly so it is not needed at all. Removing it makes things look
cleaner.
Modified:
head/sys/netinet/ip_divert.c
Modified: head/sys/netinet/ip_divert.c
==============================================================================
--- head/sys/netinet/ip_divert.c Thu Apr 28 02:39:43 2016 (r298732)
+++ head/sys/netinet/ip_divert.c Thu Apr 28 02:46:08 2016 (r298733)
@@ -765,9 +765,6 @@ static int
div_modevent(module_t mod, int type, void *unused)
{
int err = 0;
-#ifndef VIMAGE
- int n;
-#endif
switch (type) {
case MOD_LOAD:
@@ -808,8 +805,7 @@ div_modevent(module_t mod, int type, voi
* we destroy the lock.
*/
INP_INFO_WLOCK(&V_divcbinfo);
- n = V_divcbinfo.ipi_count;
- if (n != 0) {
+ if (V_divcbinfo.ipi_count != 0) {
err = EBUSY;
INP_INFO_WUNLOCK(&V_divcbinfo);
break;
More information about the svn-src-head
mailing list