aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-28 02:46:08 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-28 02:46:08 +0000
commita5b50fbc207aeb218ed482182bffe4ad646997bb (patch)
tree98a7e716050e67112f8de3bb6bc72dd142221939 /sys/netinet/ip_divert.c
parentb114da42afb21ef916c28e180b1848dc194eab8e (diff)
downloadsrc-a5b50fbc207aeb218ed482182bffe4ad646997bb.tar.gz
src-a5b50fbc207aeb218ed482182bffe4ad646997bb.zip
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.
Notes
Notes: svn path=/head/; revision=298733
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 233d1af7cda9..a17d6d9c02af 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -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, void *unused)
* 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;