Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Constify.



details:   https://anonhg.NetBSD.org/src/rev/4510a1dfcbd8
branches:  trunk
changeset: 972932:4510a1dfcbd8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jun 13 22:15:57 2020 +0000

description:
Constify.

diffstat:

 sys/dev/cgd.c    |  10 +++++-----
 sys/dev/cgdvar.h |   4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r 4c92fd3beecc -r 4510a1dfcbd8 sys/dev/cgd.c
--- a/sys/dev/cgd.c     Sat Jun 13 22:15:06 2020 +0000
+++ b/sys/dev/cgd.c     Sat Jun 13 22:15:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.132 2020/06/13 22:15:06 riastradh Exp $ */
+/* $NetBSD: cgd.c,v 1.133 2020/06/13 22:15:57 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.132 2020/06/13 22:15:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.133 2020/06/13 22:15:57 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -386,7 +386,7 @@
 static int     cgd_ioctl_get(dev_t, void *, struct lwp *);
 static int     cgdinit(struct cgd_softc *, const char *, struct vnode *,
                        struct lwp *);
-static void    cgd_cipher(struct cgd_softc *, void *, void *,
+static void    cgd_cipher(struct cgd_softc *, void *, const void *,
                           size_t, daddr_t, size_t, int);
 
 static void    cgd_selftest(void);
@@ -1535,11 +1535,11 @@
 }
 
 static void
-cgd_cipher(struct cgd_softc *sc, void *dstv, void *srcv,
+cgd_cipher(struct cgd_softc *sc, void *dstv, const void *srcv,
     size_t len, daddr_t blkno, size_t secsize, int dir)
 {
        char            *dst = dstv;
-       char            *src = srcv;
+       const char      *src = srcv;
        cfunc_cipher    *cipher = sc->sc_cfuncs->cf_cipher;
        size_t          blocksize = sc->sc_cdata.cf_blocksize;
        size_t          todo;
diff -r 4c92fd3beecc -r 4510a1dfcbd8 sys/dev/cgdvar.h
--- a/sys/dev/cgdvar.h  Sat Jun 13 22:15:06 2020 +0000
+++ b/sys/dev/cgdvar.h  Sat Jun 13 22:15:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdvar.h,v 1.20 2020/06/13 18:38:33 riastradh Exp $ */
+/* $NetBSD: cgdvar.h,v 1.21 2020/06/13 22:15:58 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -87,7 +87,7 @@
        struct buf              *cx_obp;
        struct buf              *cx_nbp;
        void                    *cx_dstv;
-       void                    *cx_srcv;
+       const void              *cx_srcv;
        size_t                   cx_len;
        daddr_t                  cx_blkno;
        size_t                   cx_secsize;



Home | Main Index | Thread Index | Old Index