diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2016-02-19 23:49:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2016-02-19 23:49:39 +0000 |
commit | 60cd8044a10db8c7dd4ef9b87ccdedfff862f654 (patch) | |
tree | 712c655f99a2566edf9117cced8c80e0015f1233 /lib/libc/gen | |
parent | 0068aa932fcef92e39d8c4879ae63235da0564b8 (diff) |
Remove the "error" variable; we no longer fall back to writing to
/dev/console so the value of "error" is never read. Also mention
that sendsyslog2 can fail due to ENOBUFS in the comment. OK deraadt@
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/syslog_r.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/syslog_r.c b/lib/libc/gen/syslog_r.c index 73e237376ad..c12534019af 100644 --- a/lib/libc/gen/syslog_r.c +++ b/lib/libc/gen/syslog_r.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslog_r.c,v 1.11 2015/11/25 00:01:21 deraadt Exp $ */ +/* $OpenBSD: syslog_r.c,v 1.12 2016/02/19 23:49:38 millert Exp $ */ /* * Copyright (c) 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -74,7 +74,7 @@ __vsyslog_r(int pri, struct syslog_data *data, { int cnt; char ch, *p, *t; - int fd, saved_errno, error; + int fd, saved_errno; #define TBUF_LEN (8192+1) #define FMT_LEN 1024 char *conp = NULL, *stdp = NULL, tbuf[TBUF_LEN], fmt_cpy[FMT_LEN]; @@ -192,10 +192,10 @@ __vsyslog_r(int pri, struct syslog_data *data, } /* - * If the sendsyslog() fails, it means that syslogd - * is not running. + * If the sendsyslog2() fails, it means that syslogd + * is not running or the kernel ran out of buffers. */ - error = sendsyslog2(tbuf, cnt, data->log_stat & LOG_CONS); + sendsyslog2(tbuf, cnt, data->log_stat & LOG_CONS); } void |