Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/compat/common Declare 'error' if needed



details:   https://anonhg.NetBSD.org/src/rev/ba2938cc51a0
branches:  pgoyette-compat
changeset: 321067:ba2938cc51a0
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Mar 18 22:49:26 2018 +0000

description:
Declare 'error' if needed

diffstat:

 sys/compat/common/ccd_60.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (57 lines):

diff -r 41c0f68c1c13 -r ba2938cc51a0 sys/compat/common/ccd_60.c
--- a/sys/compat/common/ccd_60.c        Sun Mar 18 21:41:31 2018 +0000
+++ b/sys/compat/common/ccd_60.c        Sun Mar 18 22:49:26 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ccd_60.c,v 1.1.2.2 2018/03/18 21:41:31 pgoyette Exp $  */
+/*     $NetBSD: ccd_60.c,v 1.1.2.3 2018/03/18 22:49:26 pgoyette Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -26,7 +26,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.1.2.2 2018/03/18 21:41:31 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd_60.c,v 1.1.2.3 2018/03/18 22:49:26 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -52,6 +52,8 @@
        switch (cmd) {
 #if defined(COMPAT_60) && !defined(_LP64)
        case CCDIOCSET_60: {
+               int error;
+
                if (data == NULL)
                        return 0;
                
@@ -77,6 +79,8 @@
        }
 
        case CCDIOCCLR_60:
+               int error;
+
                if (data == NULL)
                        return ENOSYS;
                /*
@@ -90,14 +94,16 @@
        }
 }
 
-void
+int
 ccd_60_init(void)
 {
-    compat_ccd_ioctl_60 = compat_60_ccdioctl;
+       compat_ccd_ioctl_60 = compat_60_ccdioctl;
+       return 0;
 }
 
-void
+int
 ccd_60_fini(void)
 {
-    compat_ccd_ioctl_60 = (void *)enosys;
+       compat_ccd_ioctl_60 = (void *)enosys;
+       return 0;
 }



Home | Main Index | Thread Index | Old Index