diff options
author | Alexander Pyhalov <apyhalov@gmail.com> | 2013-11-05 23:57:42 +0400 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2013-12-10 18:48:02 -0800 |
commit | 9584cebb1c69707f4c67306b661c2ed47d8676f1 (patch) | |
tree | 488d654d68a8f14fab21fad75a05af7fe41dd5a5 /usr/src/lib/libwrap/tli.c | |
parent | f38cb554a534c6df738be3f4d23327e69888e634 (diff) | |
download | illumos-joyent-9584cebb1c69707f4c67306b661c2ed47d8676f1.tar.gz |
1666 libwrap is 32bit only
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Garrett D'Amore <garrett.damore@dey-sys.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/lib/libwrap/tli.c')
-rw-r--r-- | usr/src/lib/libwrap/tli.c | 14 |
1 files changed, 3 insertions, 11 deletions
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); } } |