Source-Changes-HG archive

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

[src/trunk]: src/sbin/mknod Constify.



details:   https://anonhg.NetBSD.org/src/rev/7f57a20da46d
branches:  trunk
changeset: 566508:7f57a20da46d
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 11 17:09:58 2004 +0000

description:
Constify.

diffstat:

 sbin/mknod/mknod.c    |   6 +++---
 sbin/mknod/pack_dev.c |  26 +++++++++++++-------------
 sbin/mknod/pack_dev.h |   4 ++--
 3 files changed, 18 insertions(+), 18 deletions(-)

diffs (144 lines):

diff -r 37e3e15a984d -r 7f57a20da46d sbin/mknod/mknod.c
--- a/sbin/mknod/mknod.c        Tue May 11 12:29:22 2004 +0000
+++ b/sbin/mknod/mknod.c        Tue May 11 17:09:58 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mknod.c,v 1.30 2004/01/30 19:06:55 ross Exp $  */
+/*     $NetBSD: mknod.c,v 1.31 2004/05/11 17:09:58 christos Exp $      */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1998 The NetBSD Foundation, Inc.  All rights reserved.\n");
-__RCSID("$NetBSD: mknod.c,v 1.30 2004/01/30 19:06:55 ross Exp $");
+__RCSID("$NetBSD: mknod.c,v 1.31 2004/05/11 17:09:58 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -281,7 +281,7 @@
 callPack(pack_t *f, int n, u_long *numbers)
 {
        portdev_t d;
-       char *error = NULL;
+       const char *error = NULL;
 
        d = (*f)(n, numbers, &error);
        if (error != NULL)
diff -r 37e3e15a984d -r 7f57a20da46d sbin/mknod/pack_dev.c
--- a/sbin/mknod/pack_dev.c     Tue May 11 12:29:22 2004 +0000
+++ b/sbin/mknod/pack_dev.c     Tue May 11 17:09:58 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pack_dev.c,v 1.7 2004/01/30 19:06:55 ross Exp $        */
+/*     $NetBSD: pack_dev.c,v 1.8 2004/05/11 17:09:58 christos Exp $    */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: pack_dev.c,v 1.7 2004/01/30 19:06:55 ross Exp $");
+__RCSID("$NetBSD: pack_dev.c,v 1.8 2004/05/11 17:09:58 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -65,13 +65,13 @@
 static pack_t  pack_bsdos;
 static int     compare_format(const void *, const void *);
 
-static char iMajorError[] = "invalid major number";
-static char iMinorError[] = "invalid minor number";
-static char tooManyFields[] = "too many fields for format";
+static const char iMajorError[] = "invalid major number";
+static const char iMinorError[] = "invalid minor number";
+static const char tooManyFields[] = "too many fields for format";
 
        /* exported */
 portdev_t
-pack_native(int n, u_long numbers[], char **error)
+pack_native(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -88,7 +88,7 @@
 
 
 static portdev_t
-pack_netbsd(int n, u_long numbers[], char **error)
+pack_netbsd(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -110,7 +110,7 @@
                                         (((y) << 0) & 0xffff00ff)))
 
 static portdev_t
-pack_freebsd(int n, u_long numbers[], char **error)
+pack_freebsd(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -132,7 +132,7 @@
                                         (((y) << 0) & 0x000000ff)))
 
 static portdev_t
-pack_8_8(int n, u_long numbers[], char **error)
+pack_8_8(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -154,7 +154,7 @@
                                         (((y) <<  0) & 0x000fffff)))
 
 static portdev_t
-pack_12_20(int n, u_long numbers[], char **error)
+pack_12_20(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -176,7 +176,7 @@
                                         (((y) <<  0) & 0x0003ffff)))
 
 static portdev_t
-pack_14_18(int n, u_long numbers[], char **error)
+pack_14_18(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -198,7 +198,7 @@
                                         (((y) <<  0) & 0x00ffffff)))
 
 static portdev_t
-pack_8_24(int n, u_long numbers[], char **error)
+pack_8_24(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
@@ -222,7 +222,7 @@
                                         (((z) <<  0) & 0x000000ff)))
 
 static portdev_t
-pack_bsdos(int n, u_long numbers[], char **error)
+pack_bsdos(int n, u_long numbers[], const char **error)
 {
        portdev_t dev = 0;
 
diff -r 37e3e15a984d -r 7f57a20da46d sbin/mknod/pack_dev.h
--- a/sbin/mknod/pack_dev.h     Tue May 11 12:29:22 2004 +0000
+++ b/sbin/mknod/pack_dev.h     Tue May 11 17:09:58 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pack_dev.h,v 1.5 2004/01/30 19:06:55 ross Exp $        */
+/*     $NetBSD: pack_dev.h,v 1.6 2004/05/11 17:09:58 christos Exp $    */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
 #else
 typedef        dev_t           portdev_t;
 #endif
-typedef        portdev_t pack_t(int, u_long [], char **);
+typedef        portdev_t pack_t(int, u_long [], const char **);
 
 pack_t *pack_find(const char *);
 pack_t  pack_native;



Home | Main Index | Thread Index | Old Index