diff options
Diffstat (limited to 'usr.sbin/dhcpd/errwarn.c')
-rw-r--r-- | usr.sbin/dhcpd/errwarn.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/dhcpd/errwarn.c b/usr.sbin/dhcpd/errwarn.c index 36d4566b466..a76d074a46e 100644 --- a/usr.sbin/dhcpd/errwarn.c +++ b/usr.sbin/dhcpd/errwarn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: errwarn.c,v 1.4 2005/04/11 18:59:45 deraadt Exp $ */ +/* $OpenBSD: errwarn.c,v 1.5 2005/04/11 19:59:07 deraadt Exp $ */ /* Errors and warnings... */ @@ -70,8 +70,8 @@ error(char *fmt, ...) /* Also log it to stderr? */ if (log_perror) { - write(2, mbuf, strlen(mbuf)); - write(2, "\n", 1); + write(STDERR_FILENO, mbuf, strlen(mbuf)); + write(STDERR_FILENO, "\n", 1); } else syslog(log_priority | LOG_ERR, "%s", mbuf); @@ -99,8 +99,8 @@ warning(char *fmt, ...) va_end(list); if (log_perror) { - write(2, mbuf, strlen(mbuf)); - write(2, "\n", 1); + write(STDERR_FILENO, mbuf, strlen(mbuf)); + write(STDERR_FILENO, "\n", 1); } else syslog(log_priority | LOG_ERR, "%s", mbuf); @@ -122,8 +122,8 @@ note(char *fmt, ...) va_end(list); if (log_perror) { - write(2, mbuf, strlen(mbuf)); - write(2, "\n", 1); + write(STDERR_FILENO, mbuf, strlen(mbuf)); + write(STDERR_FILENO, "\n", 1); } else syslog(log_priority | LOG_INFO, "%s", mbuf); @@ -145,8 +145,8 @@ debug(char *fmt, ...) va_end(list); if (log_perror) { - write(2, mbuf, strlen(mbuf)); - write(2, "\n", 1); + write(STDERR_FILENO, mbuf, strlen(mbuf)); + write(STDERR_FILENO, "\n", 1); } else syslog(log_priority | LOG_DEBUG, "%s", mbuf); @@ -217,7 +217,7 @@ parse_warn(char *fmt, ...) iov[4].iov_len = lexchar - 1; iov[5].iov_base = "^\n"; iov[5].iov_len = 2; - writev(2, iov, sizeof(iov)/sizeof(iov[0])); + writev(STDERR_FILENO, iov, sizeof(iov)/sizeof(iov[0])); } else { syslog(log_priority | LOG_ERR, "%s", mbuf); syslog(log_priority | LOG_ERR, "%s", token_line); |