summaryrefslogtreecommitdiffstats
path: root/libexec/telnetd/utility.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-12-03 07:16:08 +0000
committercharnier <charnier@FreeBSD.org>1997-12-03 07:16:08 +0000
commit4fb0a742b1c5240b2cad42e221aa28ac18f8afa2 (patch)
treeb28511d60d77bf6230e67126c80e71232c503c81 /libexec/telnetd/utility.c
parent27c596e1ed6ea0fe26b2cf64d9e5a257d92f2d34 (diff)
downloadFreeBSD-src-4fb0a742b1c5240b2cad42e221aa28ac18f8afa2.zip
FreeBSD-src-4fb0a742b1c5240b2cad42e221aa28ac18f8afa2.tar.gz
Use err(3). Remove progname and trailing \n in syslog strings.
Diffstat (limited to 'libexec/telnetd/utility.c')
-rw-r--r--libexec/telnetd/utility.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c
index 2ee0d21..4735be3 100644
--- a/libexec/telnetd/utility.c
+++ b/libexec/telnetd/utility.c
@@ -29,12 +29,14 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $Id$
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)utility.c 8.2 (Berkeley) 12/15/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#ifdef __FreeBSD__
@@ -69,10 +71,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);
@@ -353,7 +355,6 @@ edithost(pat, host)
register char *host;
{
register char *res = editedhost;
- char *strncpy();
if (!pat)
pat = "";
@@ -523,8 +524,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;
@@ -943,7 +943,6 @@ printsub(direction, pointer, length)
break;
default:
- def_case:
if (isprint(pointer[i]) && pointer[i] != '"') {
if (noquote) {
*nfrontp++ = '"';
@@ -999,8 +998,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;
OpenPOWER on IntegriCloud