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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to