summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2018-12-14 23:42:39 +0000
committerchristos <christos@NetBSD.org>2018-12-14 23:42:39 +0000
commitdccc2c6f3fa2ed5b3e7d72049fa63e79613fe1ab (patch)
treeee3e0f80123fcb29c4ccee617ffdaa251d943c5f
parent5f7076c4cf189a856dd909cb412b0c055a0bc454 (diff)
more const
-rw-r--r--lib/libtelnet/auth-proto.h12
-rw-r--r--lib/libtelnet/auth.c14
-rw-r--r--lib/libtelnet/genget.c10
-rw-r--r--lib/libtelnet/misc.h6
4 files changed, 21 insertions, 21 deletions
diff --git a/lib/libtelnet/auth-proto.h b/lib/libtelnet/auth-proto.h
index 4262553a7f6..8a0e49059a1 100644
--- a/lib/libtelnet/auth-proto.h
+++ b/lib/libtelnet/auth-proto.h
@@ -1,4 +1,4 @@
-/* $NetBSD: auth-proto.h,v 1.15 2006/03/20 21:23:47 christos Exp $ */
+/* $NetBSD: auth-proto.h,v 1.16 2018/12/14 23:42:39 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -68,12 +68,12 @@ void auth_reply(unsigned char *, int);
void auth_disable_name(char *);
void auth_gen_printsub(unsigned char *, int, unsigned char *, int);
-int getauthmask(char *, int *);
-int auth_enable(char *);
-int auth_disable(char *);
-int auth_onoff(char *, int);
+int getauthmask(const char *, int *);
+int auth_enable(const char *);
+int auth_disable(const char *);
+int auth_onoff(const char *, int);
int auth_togdebug(int);
-int auth_status(char *);
+int auth_status(const char *);
void auth_name(unsigned char *, int);
int auth_sendname(unsigned char *, int);
void auth_finished(Authenticator *, int);
diff --git a/lib/libtelnet/auth.c b/lib/libtelnet/auth.c
index 3db63333f9f..70c53506e9e 100644
--- a/lib/libtelnet/auth.c
+++ b/lib/libtelnet/auth.c
@@ -1,4 +1,4 @@
-/* $NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $ */
+/* $NetBSD: auth.c,v 1.22 2018/12/14 23:42:39 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)auth.c 8.3 (Berkeley) 5/30/95"
#else
-__RCSID("$NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $");
+__RCSID("$NetBSD: auth.c,v 1.22 2018/12/14 23:42:39 christos Exp $");
#endif
#endif /* not lint */
@@ -216,7 +216,7 @@ auth_disable_name(char *name)
}
int
-getauthmask(char *type, int *maskp)
+getauthmask(const char *type, int *maskp)
{
register int x;
@@ -235,19 +235,19 @@ getauthmask(char *type, int *maskp)
}
int
-auth_enable(char *type)
+auth_enable(const char *type)
{
return(auth_onoff(type, 1));
}
int
-auth_disable(char *type)
+auth_disable(const char *type)
{
return(auth_onoff(type, 0));
}
int
-auth_onoff(char *type, int on)
+auth_onoff(const char *type, int on)
{
int i, mask = -1;
Authenticator *ap;
@@ -289,7 +289,7 @@ auth_togdebug(int on)
}
int
-auth_status(char *s)
+auth_status(const char *s)
{
Authenticator *ap;
int i, mask;
diff --git a/lib/libtelnet/genget.c b/lib/libtelnet/genget.c
index 49010aa9e05..a3ede78b6e5 100644
--- a/lib/libtelnet/genget.c
+++ b/lib/libtelnet/genget.c
@@ -1,4 +1,4 @@
-/* $NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $ */
+/* $NetBSD: genget.c,v 1.14 2018/12/14 23:42:39 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)genget.c 8.2 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $");
+__RCSID("$NetBSD: genget.c,v 1.14 2018/12/14 23:42:39 christos Exp $");
#endif
#endif /* not lint */
@@ -50,9 +50,9 @@ __RCSID("$NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $");
* the length of *s1 is returned.
*/
int
-isprefix(char *s1, const char *s2)
+isprefix(const char *s1, const char *s2)
{
- char *os1;
+ const char *os1;
char c1, c2;
if (*s1 == '\0')
@@ -72,7 +72,7 @@ isprefix(char *s1, const char *s2)
static char *ambiguous; /* special return value for command routines */
char **
-genget( char *name, /* name to match */
+genget(const char *name, /* name to match */
char **table, /* name entry in table */
int stlen)
{
diff --git a/lib/libtelnet/misc.h b/lib/libtelnet/misc.h
index 72116505eec..6f090063680 100644
--- a/lib/libtelnet/misc.h
+++ b/lib/libtelnet/misc.h
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.h,v 1.9 2012/01/09 15:25:34 christos Exp $ */
+/* $NetBSD: misc.h,v 1.10 2018/12/14 23:42:39 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -38,8 +38,8 @@ extern const char *RemoteHostName;
extern int ConnectedCount;
extern int ReservedPort;
-int isprefix(char *, const char *);
-char **genget(char *, char **, int);
+int isprefix(const char *, const char *);
+char **genget(const char *, char **, int);
int Ambiguous(void *);
__END_DECLS