summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog_r.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2016-02-19 23:49:38 +0000
committermillert <millert@openbsd.org>2016-02-19 23:49:38 +0000
commitf96efd98d499e15da2203be9a3ad6133cb1e4702 (patch)
tree310b513750c4acbe58ae2ff4042ad2dd6b4fbd3e /lib/libc/gen/syslog_r.c
parentenable snooping on Intel C610 (diff)
downloadwireguard-openbsd-f96efd98d499e15da2203be9a3ad6133cb1e4702.tar.xz
wireguard-openbsd-f96efd98d499e15da2203be9a3ad6133cb1e4702.zip
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/syslog_r.c')
-rw-r--r--lib/libc/gen/syslog_r.c10
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