Date: Thu, 28 Apr 2016 02:46:08 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298733 - head/sys/netinet Message-ID: <201604280246.u3S2k8Nk042929@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604280246.u3S2k8Nk042929>