summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2015-02-08 01:30:10 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2015-02-08 01:30:10 +0000
commit292ab2697072b2f956d240e985947c67e5ad9900 (patch)
tree2899b3fb01b46476eacfe0a4b72b5698e82364ac /usr.sbin
parentcdc627d534bfec24dfd85553349396fc353f19b2 (diff)
Use ebuf[ERRBUFSIZE] instead of ebuf[256] everywhere.
OK bluhm@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/syslogd/syslogd.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 23512a7b535..18655df38aa 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.149 2015/02/07 22:19:01 deraadt Exp $ */
+/* $OpenBSD: syslogd.c,v 1.150 2015/02/08 01:30:09 reyk Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -64,6 +64,7 @@
#define DEFSPRI (LOG_KERN|LOG_CRIT)
#define TIMERINTVL 30 /* interval for checking flush, mark */
#define TTYMSGTIME 1 /* timeout passed to ttymsg */
+#define ERRBUFSIZE 256
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -736,7 +737,7 @@ int
tcp_socket(struct filed *f)
{
int s, flags;
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
if ((s = socket(f->f_un.f_forw.f_addr.ss_family, SOCK_STREAM,
IPPROTO_TCP)) == -1) {
@@ -782,7 +783,7 @@ void
tcp_writecb(struct bufferevent *bufev, void *arg)
{
struct filed *f = arg;
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
/*
* Successful write, connection to server is good, reset wait time.
@@ -804,7 +805,7 @@ void
tcp_errorcb(struct bufferevent *bufev, short event, void *arg)
{
struct filed *f = arg;
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
if (event & EVBUFFER_EOF)
snprintf(ebuf, sizeof(ebuf),
@@ -901,7 +902,7 @@ struct tls *
tls_socket(struct filed *f)
{
struct tls *ctx;
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
if ((ctx = tls_client()) == NULL) {
snprintf(ebuf, sizeof(ebuf), "tls_client \"%s\"",
@@ -1453,7 +1454,7 @@ mark_timercb(int unused, short event, void *arg)
void
init_signalcb(int signum, short event, void *arg)
{
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
init();
@@ -1476,7 +1477,7 @@ init_signalcb(int signum, short event, void *arg)
void
logerror(const char *type)
{
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
if (errno)
(void)snprintf(ebuf, sizeof(ebuf), "syslogd: %s: %s",
@@ -1496,7 +1497,7 @@ die(int signo)
{
struct filed *f;
int was_initialized = Initialized;
- char ebuf[256];
+ char ebuf[ERRBUFSIZE];
Initialized = 0; /* Don't log SIGCHLDs */
SIMPLEQ_FOREACH(f, &Files, f_next) {
@@ -1775,7 +1776,7 @@ cfline(char *line, char *prog)
int i, pri;
size_t rb_len;
char *bp, *p, *q, *proto, *host, *port, *ipproto;
- char buf[MAXLINE], ebuf[256];
+ char buf[MAXLINE], ebuf[ERRBUFSIZE];
struct filed *xf, *f, *d;
struct timeval to;