From 9584cebb1c69707f4c67306b661c2ed47d8676f1 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Tue, 5 Nov 2013 23:57:42 +0400 Subject: 1666 libwrap is 32bit only Reviewed by: Andrew Stormont Reviewed by: Garrett D'Amore Reviewed by: Richard Lowe Approved by: Robert Mustacchi --- usr/src/lib/libwrap/tli.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'usr/src/lib/libwrap/tli.c') diff --git a/usr/src/lib/libwrap/tli.c b/usr/src/lib/libwrap/tli.c index 70bc462e30..6864698cfd 100644 --- a/usr/src/lib/libwrap/tli.c +++ b/usr/src/lib/libwrap/tli.c @@ -3,8 +3,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * tli_host() determines the type of transport (connected, connectionless), * the transport address of a client host, and the transport address of a @@ -49,8 +47,6 @@ static char sccsid[] = "@(#) tli.c 1.15 97/03/21 19:27:25"; extern char *nc_sperror(); extern int errno; -extern char *sys_errlist[]; -extern int sys_nerr; extern int t_errno; extern char *t_errlist[]; extern int t_nerr; @@ -320,18 +316,14 @@ static char *tli_error() if (t_errno != TSYSERR) { if (t_errno < 0 || t_errno >= t_nerr) { - sprintf(buf, "Unknown TLI error %d", t_errno); + snprintf(buf, sizeof (buf), "Unknown TLI error %d", t_errno); return (buf); } else { return (t_errlist[t_errno]); } } else { - if (errno < 0 || errno >= sys_nerr) { - sprintf(buf, "Unknown UNIX error %d", errno); - return (buf); - } else { - return (sys_errlist[errno]); - } + STRN_CPY(buf, strerror(errno), sizeof (buf)); + return (buf); } } -- cgit v1.2.3