mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
sync with KAME
- use strerror(3).
This commit is contained in:
parent
d0ab3a0c1e
commit
fb552d5b67
@ -63,12 +63,8 @@ log_write(int severity, int syserr, const char *format, ...)
|
||||
if (severity <= l_debug) {
|
||||
if (!daemonize) {
|
||||
vfprintf(stderr, format, ap);
|
||||
if (syserr != 0) {
|
||||
if (syserr < sys_nerr)
|
||||
fprintf(stderr, ": %s", sys_errlist[syserr]);
|
||||
else
|
||||
fprintf(stderr, ": errno %d", syserr);
|
||||
}
|
||||
if (syserr != 0)
|
||||
fprintf(stderr, ": %s", strerror(syserr));
|
||||
fprintf(stderr, "\n");
|
||||
} else {
|
||||
if (syserr == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user