svn commit: r359399 - in head/contrib/telnet: libtelnet telnetd

Kyle Evans kevans at FreeBSD.org
Sat Mar 28 17:06:44 UTC 2020


Author: kevans
Date: Sat Mar 28 17:06:34 2020
New Revision: 359399
URL: https://svnweb.freebsd.org/changeset/base/359399

Log:
  telnet: remove some duplicate definitions, mark terminaltype extern
  
  Most of these were already properly declared and defined elsewhere, this is
  effectively just a minor cleanup that fixes the -fno-common build.
  
  -fno-common will become the default in GCC10/LLVM11.
  
  MFC after:	3 days

Modified:
  head/contrib/telnet/libtelnet/encrypt.c
  head/contrib/telnet/telnetd/ext.h
  head/contrib/telnet/telnetd/sys_term.c
  head/contrib/telnet/telnetd/telnetd.c

Modified: head/contrib/telnet/libtelnet/encrypt.c
==============================================================================
--- head/contrib/telnet/libtelnet/encrypt.c	Sat Mar 28 17:02:32 2020	(r359398)
+++ head/contrib/telnet/libtelnet/encrypt.c	Sat Mar 28 17:06:34 2020	(r359399)
@@ -69,13 +69,6 @@ static const char sccsid[] = "@(#)encrypt.c	8.2 (Berke
 #include "encrypt.h"
 #include "misc.h"
 
-/*
- * These functions pointers point to the current routines
- * for encrypting and decrypting data.
- */
-void	(*encrypt_output)(unsigned char *, int);
-int	(*decrypt_input)(int);
-
 int EncryptType(char *type, char *mode);
 int EncryptStart(char *mode);
 int EncryptStop(char *mode);

Modified: head/contrib/telnet/telnetd/ext.h
==============================================================================
--- head/contrib/telnet/telnetd/ext.h	Sat Mar 28 17:02:32 2020	(r359398)
+++ head/contrib/telnet/telnetd/ext.h	Sat Mar 28 17:06:34 2020	(r359399)
@@ -58,7 +58,7 @@ extern int	auth_level;
 
 extern slcfun	slctab[NSLC + 1];	/* slc mapping table */
 
-char	*terminaltype;
+extern char	*terminaltype;
 
 /*
  * I/O data buffers, pointers, and counters.
@@ -175,6 +175,10 @@ void	output_datalen(const char *, int);
 void	startslave(char *, int, char *);
 
 #ifdef	ENCRYPTION
+/*
+ * These functions pointers point to the current routines
+ * for encrypting and decrypting data.
+ */
 extern void	(*encrypt_output)(unsigned char *, int);
 extern int	(*decrypt_input)(int);
 extern char	*nclearto;

Modified: head/contrib/telnet/telnetd/sys_term.c
==============================================================================
--- head/contrib/telnet/telnetd/sys_term.c	Sat Mar 28 17:02:32 2020	(r359398)
+++ head/contrib/telnet/telnetd/sys_term.c	Sat Mar 28 17:06:34 2020	(r359399)
@@ -376,8 +376,6 @@ spcset(int func, cc_t *valp, cc_t **valpp)
  *
  * Returns the file descriptor of the opened pty.
  */
-char line[32];
-
 int
 getpty(int *ptynum __unused)
 {

Modified: head/contrib/telnet/telnetd/telnetd.c
==============================================================================
--- head/contrib/telnet/telnetd/telnetd.c	Sat Mar 28 17:02:32 2020	(r359398)
+++ head/contrib/telnet/telnetd/telnetd.c	Sat Mar 28 17:06:34 2020	(r359399)
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
 
 #ifdef	AUTHENTICATION
 #include <libtelnet/auth.h>
-int	auth_level = 0;
 #endif
 #ifdef	ENCRYPTION
 #include <libtelnet/encrypt.h>


More information about the svn-src-all mailing list