summaryrefslogtreecommitdiffstats
path: root/contrib/pf/authpf
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/authpf
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/authpf')
-rw-r--r--contrib/pf/authpf/authpf.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c
index 09d0ac3..ed3d172 100644
--- a/contrib/pf/authpf/authpf.c
+++ b/contrib/pf/authpf/authpf.c
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
@@ -50,9 +50,6 @@
#include "pathnames.h"
-#if defined(__FreeBSD__)
-#define __dead __volatile
-#endif
extern int symset(const char *, const char *, int);
static int read_config(FILE *);
@@ -77,7 +74,11 @@ struct timeval Tstart, Tend; /* start and end times of session */
volatile sig_atomic_t want_death;
static void need_death(int signo);
+#ifdef __FreeBSD__
+static __dead2 void do_death(int);
+#else
static __dead void do_death(int);
+#endif
/*
* User shell for authenticating gateways. Sole purpose is to allow
@@ -289,9 +290,8 @@ dogdeath:
sleep(180); /* them lusers read reaaaaal slow */
die:
do_death(0);
-#if defined(__FreeBSD__)
- return 0; /* gcc hack to prevent warning */
-#endif
+
+ /* NOTREACHED */
}
/*
@@ -730,7 +730,11 @@ need_death(int signo)
/*
* function that removes our stuff when we go away.
*/
+#ifdef __FreeBSD__
+static __dead2 void
+#else
static __dead void
+#endif
do_death(int active)
{
int ret = 0;
OpenPOWER on IntegriCloud