diff options
author | charnier <charnier@FreeBSD.org> | 1997-12-08 07:41:13 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-12-08 07:41:13 +0000 |
commit | 25d74465e296aeafa9f165590252b3a190ed7d37 (patch) | |
tree | 80aae474ea825a57cadaebb6cb2af544503715e8 /crypto/telnet/telnetd/utility.c | |
parent | db661a8b0cd07e05505e16d7740d34c8f19bf4c8 (diff) | |
download | FreeBSD-src-25d74465e296aeafa9f165590252b3a190ed7d37.zip FreeBSD-src-25d74465e296aeafa9f165590252b3a190ed7d37.tar.gz |
MFC: no \n in syslog strings. Change -P to -p in flags. EOF -> -1. Use err(3).
Diffstat (limited to 'crypto/telnet/telnetd/utility.c')
-rw-r--r-- | crypto/telnet/telnetd/utility.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/crypto/telnet/telnetd/utility.c b/crypto/telnet/telnetd/utility.c index eac3b69..4c9dec1 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; |