summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-02-01 01:32:19 +0000
committerobrien <obrien@FreeBSD.org>2002-02-01 01:32:19 +0000
commitb45ff0fb569a631733b0fe8174ef6bd2e76d6523 (patch)
tree00d3cf581cd6698c5f1022d99c44cb5d6fa3bd12 /lib/libc/gen/syslog.c
parent821a3b87a652fabbbe0c63b418858e7bc7a1537b (diff)
downloadFreeBSD-src-b45ff0fb569a631733b0fe8174ef6bd2e76d6523.zip
FreeBSD-src-b45ff0fb569a631733b0fe8174ef6bd2e76d6523.tar.gz
* Remove __P and convert to ANSI prototypes.
* Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
Diffstat (limited to 'lib/libc/gen/syslog.c')
-rw-r--r--lib/libc/gen/syslog.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index b6eab59..90fd904 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -32,12 +32,10 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-/*
static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95";
-*/
-static const char rcsid[] =
- "$FreeBSD$";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include "namespace.h"
#include <sys/types.h>
@@ -71,8 +69,8 @@ static int LogFacility = LOG_USER; /* default facility code */
static int LogMask = 0xff; /* mask of priorities to be logged */
extern char *__progname; /* Program name, from crt0. */
-static void disconnectlog __P((void)); /* disconnect from syslogd */
-static void connectlog __P((void)); /* (re)connect to syslogd */
+static void disconnectlog(void); /* disconnect from syslogd */
+static void connectlog(void); /* (re)connect to syslogd */
/*
* Format of the magic cookie passed through the stdio hook
@@ -136,11 +134,11 @@ syslog(pri, fmt, va_alist)
void
vsyslog(pri, fmt, ap)
int pri;
- register const char *fmt;
+ const char *fmt;
va_list ap;
{
- register int cnt;
- register char ch, *p;
+ int cnt;
+ char ch, *p;
time_t now;
int fd, saved_errno;
char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26];
@@ -230,7 +228,7 @@ vsyslog(pri, fmt, ap)
/* Output to stderr if requested. */
if (LogStat & LOG_PERROR) {
struct iovec iov[2];
- register struct iovec *v = iov;
+ struct iovec *v = iov;
v->iov_base = stdp;
v->iov_len = cnt - (stdp - tbuf);
@@ -264,7 +262,7 @@ vsyslog(pri, fmt, ap)
if (LogStat & LOG_CONS &&
(fd = _open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) {
struct iovec iov[2];
- register struct iovec *v = iov;
+ struct iovec *v = iov;
p = strchr(tbuf, '>') + 1;
v->iov_base = p;
OpenPOWER on IntegriCloud