Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Don't initialize variables that no longer exist in b...



details:   https://anonhg.NetBSD.org/src/rev/794c2565255a
branches:  trunk
changeset: 816664:794c2565255a
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Jul 17 01:16:30 2016 +0000

description:
Don't initialize variables that no longer exist in built-in module.

diffstat:

 sys/net/bpf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 8aad2dbc43a4 -r 794c2565255a sys/net/bpf.c
--- a/sys/net/bpf.c     Sun Jul 17 01:03:46 2016 +0000
+++ b/sys/net/bpf.c     Sun Jul 17 01:16:30 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.200 2016/07/17 01:03:46 pgoyette Exp $       */
+/*     $NetBSD: bpf.c,v 1.201 2016/07/17 01:16:30 pgoyette Exp $       */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.200 2016/07/17 01:03:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.201 2016/07/17 01:16:30 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -2117,12 +2117,12 @@
 #endif
        int error;
 
-       bmajor = cmajor = NODEVMAJOR;
 
        switch (cmd) {
        case MODULE_CMD_INIT:
                bpfilterattach(0);
 #ifdef _MODULE
+               bmajor = cmajor = NODEVMAJOR;
                error = devsw_attach("bpf", NULL, &bmajor,
                    &bpf_cdevsw, &cmajor);
                if (error == EEXIST)



Home | Main Index | Thread Index | Old Index