summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-11 20:04:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-04-11 20:04:44 +0000
commitdb2bd862883ac8f48e0f1809dadf8ee20977fb6d (patch)
treec41c0065433673c474239d410e14c5a7f0395428 /sbin
parenta8a02c3665de209f4c02c3f4e0e382eaf75ac327 (diff)
use STDERR_FILENO
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/errwarn.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sbin/dhclient/errwarn.c b/sbin/dhclient/errwarn.c
index c37ca4c6d14..fccd1dcff12 100644
--- a/sbin/dhclient/errwarn.c
+++ b/sbin/dhclient/errwarn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: errwarn.c,v 1.9 2005/04/11 15:16:29 deraadt Exp $ */
+/* $OpenBSD: errwarn.c,v 1.10 2005/04/11 20:04:43 deraadt Exp $ */
/* Errors and warnings... */
@@ -74,8 +74,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);
}
syslog(LOG_CRIT, "exiting.");
@@ -105,8 +105,8 @@ warning(char *fmt, ...)
#endif
if (log_perror) {
- write(2, mbuf, strlen(mbuf));
- write(2, "\n", 1);
+ write(STDERR_FILENO, mbuf, strlen(mbuf));
+ write(STDERR_FILENO, "\n", 1);
}
return (0);
@@ -131,8 +131,8 @@ note(char *fmt, ...)
#endif
if (log_perror) {
- write(2, mbuf, strlen(mbuf));
- write(2, "\n", 1);
+ write(STDERR_FILENO, mbuf, strlen(mbuf));
+ write(STDERR_FILENO, "\n", 1);
}
return (0);
@@ -157,8 +157,8 @@ debug(char *fmt, ...)
#endif
if (log_perror) {
- write(2, mbuf, strlen(mbuf));
- write(2, "\n", 1);
+ write(STDERR_FILENO, mbuf, strlen(mbuf));
+ write(STDERR_FILENO, "\n", 1);
}
return (0);
@@ -238,7 +238,7 @@ parse_warn(char *fmt, ...)
iov[4].iov_len = lexchar - 1;
iov[5].iov_base = "\n";
iov[5].iov_len = 1;
- writev(2, iov, sizeof(iov)/sizeof(iov[0]));
+ writev(STDERR_FILENO, iov, sizeof(iov)/sizeof(iov[0]));
}
warnings_occurred = 1;
return (0);