Source-Changes-HG archive

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

[src/trunk]: src/sys/coda move module code inside module ifdef



details:   https://anonhg.NetBSD.org/src/rev/d19ccf4e28aa
branches:  trunk
changeset: 790562:d19ccf4e28aa
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 17 20:54:24 2013 +0000

description:
move module code inside module ifdef

diffstat:

 sys/coda/coda_psdev.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r b524bd9382ec -r d19ccf4e28aa sys/coda/coda_psdev.c
--- a/sys/coda/coda_psdev.c     Thu Oct 17 20:43:49 2013 +0000
+++ b/sys/coda/coda_psdev.c     Thu Oct 17 20:54:24 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: coda_psdev.c,v 1.49 2012/08/04 12:31:57 christos Exp $ */
+/*     $NetBSD: coda_psdev.c,v 1.50 2013/10/17 20:54:24 christos Exp $ */
 
 /*
  *
@@ -54,7 +54,7 @@
 /* These routines are the device entry points for Venus. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.49 2012/08/04 12:31:57 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.50 2013/10/17 20:54:24 christos Exp $");
 
 extern int coda_nc_initialized;    /* Set if cache has been initialized */
 
@@ -730,15 +730,15 @@
 static int
 vcoda_modcmd(modcmd_t cmd, void *arg)
 {
-       int cmajor, dmajor, error = 0;
-
-       dmajor = cmajor = -1;
+       int error = 0;
 
        switch (cmd) {
        case MODULE_CMD_INIT:
 #ifdef _MODULE
+               int cmajor, dmajor;
                vcodaattach(NVCODA);
 
+               dmajor = cmajor = -1;
                return devsw_attach("vcoda", NULL, &dmajor,
                    &vcoda_cdevsw, &cmajor);
 #endif



Home | Main Index | Thread Index | Old Index