aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/telnet/telnetd/utility.c
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1997-12-08 07:41:13 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1997-12-08 07:41:13 +0000
commit81e04eaec0ad77deac6dc3484e6e6725902c620f (patch)
tree1e546f46899839fcd25be25ea55ec86e10bc07bb /crypto/telnet/telnetd/utility.c
parent50b5ec4154e7deff62c82d0f8e000352afc6e1fc (diff)
downloadsrc-81e04eaec0ad77deac6dc3484e6e6725902c620f.tar.gz
src-81e04eaec0ad77deac6dc3484e6e6725902c620f.zip
MFC: no \n in syslog strings. Change -P to -p in flags. EOF -> -1. Use err(3).
Notes
Notes: svn path=/head/; revision=31622
Diffstat (limited to 'crypto/telnet/telnetd/utility.c')
-rw-r--r--crypto/telnet/telnetd/utility.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/crypto/telnet/telnetd/utility.c b/crypto/telnet/telnetd/utility.c
index eac3b6905246..4c9dec1c118e 100644
--- a/crypto/telnet/telnetd/utility.c
+++ b/crypto/telnet/telnetd/utility.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static const char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#ifdef __FreeBSD__
@@ -73,10 +77,10 @@ ttloop()
}
ncc = read(net, netibuf, sizeof netibuf);
if (ncc < 0) {
- syslog(LOG_INFO, "ttloop: read: %m\n");
+ syslog(LOG_INFO, "ttloop: read: %m");
exit(1);
} else if (ncc == 0) {
- syslog(LOG_INFO, "ttloop: peer died: %m\n");
+ syslog(LOG_INFO, "ttloop: peer died: %m");
exit(1);
}
DIAG(TD_REPORT, {sprintf(nfrontp, "td: ttloop read %d chars\r\n", ncc);
@@ -391,7 +395,6 @@ edithost(pat, host)
register char *host;
{
register char *res = editedhost;
- char *strncpy();
if (!pat)
pat = "";
@@ -537,8 +540,7 @@ printsub(direction, pointer, length)
unsigned char *pointer; /* where suboption data sits */
int length; /* length of suboption data */
{
- register int i;
- char buf[512];
+ register int i = 0;
if (!(diagnostic & TD_OPTIONS))
return;
@@ -1012,8 +1014,11 @@ printsub(direction, pointer, length)
"MUTUAL" : "ONE-WAY");
nfrontp += strlen(nfrontp);
- auth_printsub(&pointer[1], length - 1, buf, sizeof(buf));
- sprintf(nfrontp, "%s", buf);
+ {
+ char buf[512];
+ auth_printsub(&pointer[1], length - 1, buf, sizeof(buf));
+ sprintf(nfrontp, "%s", buf);
+ }
nfrontp += strlen(nfrontp);
break;
@@ -1107,8 +1112,11 @@ printsub(direction, pointer, length)
sprintf(nfrontp, " %d (unknown)", pointer[2]);
nfrontp += strlen(nfrontp);
- encrypt_printsub(&pointer[1], length - 1, buf, sizeof(buf));
- sprintf(nfrontp, "%s", buf);
+ {
+ char buf[512];
+ encrypt_printsub(&pointer[1], length - 1, buf, sizeof(buf));
+ sprintf(nfrontp, "%s", buf);
+ }
nfrontp += strlen(nfrontp);
break;