Source-Changes-HG archive

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

[src/trunk]: src make ipsec_strerror(3) to return const char *, not char *. ...



details:   https://anonhg.NetBSD.org/src/rev/69eb1f16d141
branches:  trunk
changeset: 495498:69eb1f16d141
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 30 02:38:35 2000 +0000

description:
make ipsec_strerror(3) to return const char *, not char *.  sync with kame.

diffstat:

 lib/libipsec/ipsec_strerror.3 |   8 ++++----
 lib/libipsec/ipsec_strerror.c |  10 +++++-----
 lib/libipsec/ipsec_strerror.h |   6 +++---
 sys/netinet6/ipsec.h          |   8 ++++----
 4 files changed, 16 insertions(+), 16 deletions(-)

diffs (110 lines):

diff -r 40a7d525a324 -r 69eb1f16d141 lib/libipsec/ipsec_strerror.3
--- a/lib/libipsec/ipsec_strerror.3     Sun Jul 30 02:33:13 2000 +0000
+++ b/lib/libipsec/ipsec_strerror.3     Sun Jul 30 02:38:35 2000 +0000
@@ -1,7 +1,7 @@
+.\"    $NetBSD: ipsec_strerror.3,v 1.8 2000/07/30 02:38:36 itojun Exp $
+.\"    $KAME: ipsec_strerror.3,v 1.7 2000/07/30 00:45:45 itojun Exp $
+.\"
 .\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
-.\"    $NetBSD: ipsec_strerror.3,v 1.7 2000/06/12 10:40:52 itojun Exp $
-.\"    $KAME: ipsec_strerror.3,v 1.6 2000/05/07 05:25:03 itojun Exp $
-.\"
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@
 .\"
 .Sh SYNOPSIS
 .Fd #include <netinet6/ipsec.h>
-.Ft "char *"
+.Ft "const char *"
 .Fn ipsec_strerror
 .\"
 .Sh DESCRIPTION
diff -r 40a7d525a324 -r 69eb1f16d141 lib/libipsec/ipsec_strerror.c
--- a/lib/libipsec/ipsec_strerror.c     Sun Jul 30 02:33:13 2000 +0000
+++ b/lib/libipsec/ipsec_strerror.c     Sun Jul 30 02:38:35 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ipsec_strerror.c,v 1.6 2000/06/12 10:40:52 itojun Exp $        */
-/*     $KAME: ipsec_strerror.c,v 1.6 2000/05/07 05:25:03 itojun Exp $  */
+/*     $NetBSD: ipsec_strerror.c,v 1.7 2000/07/30 02:38:36 itojun Exp $        */
+/*     $KAME: ipsec_strerror.c,v 1.7 2000/07/30 00:45:12 itojun Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -40,7 +40,7 @@
 
 int __ipsec_errcode;
 
-static char *ipsec_errlist[] = {
+static const char *ipsec_errlist[] = {
 "Success",                                     /*EIPSEC_NO_ERROR*/
 "Not supported",                               /*EIPSEC_NOT_SUPPORTED*/
 "Invalid argument",                            /*EIPSEC_INVAL_ARGUMENT*/
@@ -71,7 +71,7 @@
 "Unknown error",                               /*EIPSEC_MAX*/
 };
 
-char *ipsec_strerror(void)
+const char *ipsec_strerror(void)
 {
        if (__ipsec_errcode < 0 || __ipsec_errcode > EIPSEC_MAX)
                __ipsec_errcode = EIPSEC_MAX;
@@ -79,7 +79,7 @@
        return ipsec_errlist[__ipsec_errcode];
 }
 
-void __ipsec_set_strerror(char *str)
+void __ipsec_set_strerror(const char *str)
 {
        __ipsec_errcode = EIPSEC_SYSTEM_ERROR;
        ipsec_errlist[EIPSEC_SYSTEM_ERROR] = str;
diff -r 40a7d525a324 -r 69eb1f16d141 lib/libipsec/ipsec_strerror.h
--- a/lib/libipsec/ipsec_strerror.h     Sun Jul 30 02:33:13 2000 +0000
+++ b/lib/libipsec/ipsec_strerror.h     Sun Jul 30 02:38:35 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ipsec_strerror.h,v 1.6 2000/06/12 10:40:52 itojun Exp $        */
-/*     $KAME: ipsec_strerror.h,v 1.7 2000/05/07 05:25:03 itojun Exp $  */
+/*     $NetBSD: ipsec_strerror.h,v 1.7 2000/07/30 02:38:36 itojun Exp $        */
+/*     $KAME: ipsec_strerror.h,v 1.8 2000/07/30 00:45:12 itojun Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -31,7 +31,7 @@
  */
 
 extern int __ipsec_errcode;
-extern void __ipsec_set_strerror __P((char *));
+extern void __ipsec_set_strerror __P((const char *));
 
 #define EIPSEC_NO_ERROR                0       /*success*/
 #define EIPSEC_NOT_SUPPORTED   1       /*not supported*/
diff -r 40a7d525a324 -r 69eb1f16d141 sys/netinet6/ipsec.h
--- a/sys/netinet6/ipsec.h      Sun Jul 30 02:33:13 2000 +0000
+++ b/sys/netinet6/ipsec.h      Sun Jul 30 02:38:35 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ipsec.h,v 1.14 2000/06/15 05:01:08 itojun Exp $        */
-/*     $KAME: ipsec.h,v 1.32 2000/06/15 04:08:54 itojun Exp $  */
+/*     $NetBSD: ipsec.h,v 1.15 2000/07/30 02:38:35 itojun Exp $        */
+/*     $KAME: ipsec.h,v 1.35 2000/07/30 00:45:11 itojun Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -48,7 +48,7 @@
 
 /*
  * Security Policy Index
- * NOTE: Encure to be same address family and upper layer protocol.
+ * NOTE: Ensure to be same address family and upper layer protocol.
  * NOTE: ul_proto, port number, uid, gid:
  *     ANY: reserved for waldcard.
  *     0 to (~0 - 1): is one of the number of each value.
@@ -384,7 +384,7 @@
 extern int ipsec_get_policylen __P((caddr_t));
 extern char *ipsec_dump_policy __P((caddr_t, char *));
 
-extern char *ipsec_strerror __P((void));
+extern const char *ipsec_strerror __P((void));
 #endif /*!_KERNEL*/
 
 #endif /*_NETINET6_IPSEC_H_*/



Home | Main Index | Thread Index | Old Index