summaryrefslogtreecommitdiffstats
path: root/contrib/pf/pflogd
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-03-15 13:41:17 +0000
committermlaier <mlaier@FreeBSD.org>2004-03-15 13:41:17 +0000
commit4c91a73d426123e1662d8a1b186f9605ca384b73 (patch)
tree0cd850f4bfbc1ebe7c447546892114cb24f965a6 /contrib/pf/pflogd
parent950b98f1f71ea41489c4abcf9e4071bc2a3d33da (diff)
downloadFreeBSD-src-4c91a73d426123e1662d8a1b186f9605ca384b73.zip
FreeBSD-src-4c91a73d426123e1662d8a1b186f9605ca384b73.tar.gz
Fix some style(9) related issues after discussion with/education from bde:
- Add <sys/param.h> and <limits.h> where required (do not depend on other headers pulling it in). - __dead -> __dead2 - #if defined() -> #ifdef - Remove ugly PRIu64 macros and use %llu w/ (unsigned long long) cast. All changes looped back to OpenBSD (where applicable) for easier sync in the future. Requested by: bde Approved by: bms(mentor)
Diffstat (limited to 'contrib/pf/pflogd')
-rw-r--r--contrib/pf/pflogd/pflogd.c14
-rw-r--r--contrib/pf/pflogd/pidfile.c3
2 files changed, 7 insertions, 10 deletions
diff --git a/contrib/pf/pflogd/pflogd.c b/contrib/pf/pflogd/pflogd.c
index 10d8816..6ed5f9f 100644
--- a/contrib/pf/pflogd/pflogd.c
+++ b/contrib/pf/pflogd/pflogd.c
@@ -45,16 +45,12 @@
#include <errno.h>
#include <stdarg.h>
#include <fcntl.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
#include "pidfile.h"
#else
#include <util.h>
#endif
-#if defined(__FreeBSD__)
-#define __dead __volatile
-#endif
-
#define DEF_SNAPLEN 116 /* default plus allow for larger header of pflog */
#define PCAP_TO_MS 500 /* pcap read timeout (ms) */
#define PCAP_NUM_PKTS 1000 /* max number of packets to process at each loop */
@@ -88,11 +84,7 @@ int reset_dump(void);
void sig_alrm(int);
void sig_close(int);
void sig_hup(int);
-#if defined(__FreeBSD__)
-__volatile void usage(void);
-#else
void usage(void);
-#endif
char *
@@ -135,7 +127,11 @@ logmsg(int pri, const char *message, ...)
va_end(ap);
}
+#ifdef __FreeBSD__
+__dead2 void
+#else
__dead void
+#endif
usage(void)
{
fprintf(stderr, "usage: pflogd [-D] [-d delay] [-f filename] ");
diff --git a/contrib/pf/pflogd/pidfile.c b/contrib/pf/pflogd/pidfile.c
index 61eca26..db6007f 100644
--- a/contrib/pf/pflogd/pidfile.c
+++ b/contrib/pf/pflogd/pidfile.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/* $OpenBSD: pidfile.c,v 1.5 2002/05/26 09:29:02 deraadt Exp $ */
/* $NetBSD: pidfile.c,v 1.4 2001/02/19 22:43:42 cgd Exp $ */
@@ -47,7 +48,7 @@ static const char rcsid[] = "$OpenBSD: pidfile.c,v 1.5 2002/05/26 09:29:02 deraa
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
#include "pidfile.h"
#else
#include <util.h>
OpenPOWER on IntegriCloud