summaryrefslogtreecommitdiffstats
path: root/crypto/telnet/libtelnet/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/telnet/libtelnet/misc.c')
-rw-r--r--crypto/telnet/libtelnet/misc.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/crypto/telnet/libtelnet/misc.c b/crypto/telnet/libtelnet/misc.c
index c9ebec7..e9e7957 100644
--- a/crypto/telnet/libtelnet/misc.c
+++ b/crypto/telnet/libtelnet/misc.c
@@ -32,6 +32,7 @@
*/
#include <sys/cdefs.h>
+
__FBSDID("$FreeBSD$");
#ifndef lint
@@ -42,8 +43,10 @@ static const char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/4/93";
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+
#include "misc.h"
-#if defined(AUTHENTICATION)
+#ifdef AUTHENTICATION
#include "auth.h"
#endif
#ifdef ENCRYPTION
@@ -55,16 +58,18 @@ char *LocalHostName;
char *UserNameRequested = 0;
int ConnectedCount = 0;
- void
-auth_encrypt_init(local, remote, name, server)
- char *local;
- char *remote;
- char *name;
- int server;
+#ifndef AUTHENTICATION
+#define undef1 __unused
+#else
+#define undef1
+#endif
+
+void
+auth_encrypt_init(char *local, char *remote, const char *name undef1, int server undef1)
{
RemoteHostName = remote;
LocalHostName = local;
-#if defined(AUTHENTICATION)
+#ifdef AUTHENTICATION
auth_init(name, server);
#endif
#ifdef ENCRYPTION
@@ -76,27 +81,23 @@ auth_encrypt_init(local, remote, name, server)
}
}
- void
-auth_encrypt_user(name)
- char *name;
+#ifdef ENCRYPTION
+void
+auth_encrypt_user(char *name)
{
- extern char *strdup();
-
if (UserNameRequested)
free(UserNameRequested);
UserNameRequested = name ? strdup(name) : 0;
}
- void
-auth_encrypt_connect(cnt)
- int cnt;
+void
+auth_encrypt_connect(int cnt __unused)
{
}
+#endif /* ENCRYPTION */
- void
-printd(data, cnt)
- unsigned char *data;
- int cnt;
+void
+printd(const unsigned char *data, int cnt)
{
if (cnt > 16)
cnt = 16;
OpenPOWER on IntegriCloud