diff options
author | David Hankins <dhankins@isc.org> | 2004-09-30 20:38:32 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2004-09-30 20:38:32 +0000 |
commit | dc545b8698b867d4d9d2adccf2e2d1233a6467d4 (patch) | |
tree | cd68fd9cacc47ccad1e9be07721a77d3f3015643 /common | |
parent | 621797247ced3d863d7c4f0e90b4af4625a9dc82 (diff) | |
download | isc-dhcp-dc545b8698b867d4d9d2adccf2e2d1233a6467d4.tar.gz |
- Log functions writing to stderr were adjusted to use the STDERR_FILENO
system definition rather than '2'. This is a no-op for 90% of platforms.
Diffstat (limited to 'common')
-rw-r--r-- | common/parse.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/common/parse.c b/common/parse.c index 1104ccbd..e29fdcff 100644 --- a/common/parse.c +++ b/common/parse.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.104.2.19 2004/09/30 20:23:06 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.104.2.20 2004/09/30 20:38:31 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -4837,13 +4837,14 @@ int parse_warn (struct parse *cfile, const char *fmt, ...) #endif if (log_perror) { - write (2, mbuf, strlen (mbuf)); - write (2, "\n", 1); - write (2, cfile -> token_line, strlen (cfile -> token_line)); - write (2, "\n", 1); + write (STDERR_FILENO, mbuf, strlen (mbuf)); + write (STDERR_FILENO, "\n", 1); + write (STDERR_FILENO, cfile -> token_line, + strlen (cfile -> token_line)); + write (STDERR_FILENO, "\n", 1); if (cfile -> lexchar < 81) - write (2, lexbuf, lix); - write (2, "^\n", 2); + write (STDERR_FILENO, lexbuf, lix); + write (STDERR_FILENO, "^\n", 2); } cfile -> warnings_occurred = 1; |