diff options
| author | 2020-02-13 21:34:06 +0000 | |
|---|---|---|
| committer | 2020-02-13 21:34:06 +0000 | |
| commit | 40adc7c53e27d127bc335a503ac956d7aa0cbf3a (patch) | |
| tree | efa48361cb08196656a2a58dd37708c72622316c /usr.bin/dig/lib/isc/unix/errno2result.c | |
| parent | Fix missing locking during calls to selwakeup(). (diff) | |
| download | wireguard-openbsd-40adc7c53e27d127bc335a503ac956d7aa0cbf3a.tar.xz wireguard-openbsd-40adc7c53e27d127bc335a503ac956d7aa0cbf3a.zip | |
threads are gone, replace thread safe isc__strerror() wrapper
with strerror() and drop it
ok millert florian
Diffstat (limited to 'usr.bin/dig/lib/isc/unix/errno2result.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/errno2result.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/dig/lib/isc/unix/errno2result.c b/usr.bin/dig/lib/isc/unix/errno2result.c index 449209449be..8675d9b4bb6 100644 --- a/usr.bin/dig/lib/isc/unix/errno2result.c +++ b/usr.bin/dig/lib/isc/unix/errno2result.c @@ -14,14 +14,14 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: errno2result.c,v 1.3 2020/02/13 12:03:51 jsg Exp $ */ +/* $Id: errno2result.c,v 1.4 2020/02/13 21:34:06 jung Exp $ */ /*! \file */ #include <errno.h> +#include <string.h> #include <isc/result.h> -#include <isc/strerror.h> #include <isc/util.h> #include "errno2result.h" @@ -36,8 +36,6 @@ isc_result_t isc___errno2result(int posixerrno, isc_boolean_t dolog, const char *file, unsigned int line) { - char strbuf[ISC_STRERRORSIZE]; - switch (posixerrno) { case ENOTDIR: case ELOOP: @@ -89,10 +87,9 @@ isc___errno2result(int posixerrno, isc_boolean_t dolog, return (ISC_R_CONNREFUSED); default: if (dolog) { - isc__strerror(posixerrno, strbuf, sizeof(strbuf)); UNEXPECTED_ERROR(file, line, "unable to convert errno " "to isc_result: %d: %s", - posixerrno, strbuf); + posixerrno, strerror(posixerrno)); } /* * XXXDCL would be nice if perhaps this function could |
