From 4c91a73d426123e1662d8a1b186f9605ca384b73 Mon Sep 17 00:00:00 2001 From: mlaier Date: Mon, 15 Mar 2004 13:41:17 +0000 Subject: Fix some style(9) related issues after discussion with/education from bde: - Add and 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) --- contrib/pf/pflogd/pflogd.c | 14 +++++--------- contrib/pf/pflogd/pidfile.c | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'contrib/pf/pflogd') 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 #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include "pidfile.h" #else #include #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 #include #include -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ #include "pidfile.h" #else #include -- cgit v1.1