diff options
author | Joel Knight <joel@cvs.openbsd.org> | 2012-05-28 20:55:41 +0000 |
---|---|---|
committer | Joel Knight <joel@cvs.openbsd.org> | 2012-05-28 20:55:41 +0000 |
commit | 0318623ea5e73c19426dd575773ed902966ef2b9 (patch) | |
tree | c842ed25661f16d1db9bf893ece011e1f74a0ec8 /usr.sbin/snmpd/pf.c | |
parent | 4c29e05b74e3c6115915a1e27bc29e124a18ef29 (diff) |
Plug a couple more fd leaks. As part of the fix, make all the *init
functions return void.
ok krw@
Diffstat (limited to 'usr.sbin/snmpd/pf.c')
-rw-r--r-- | usr.sbin/snmpd/pf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/snmpd/pf.c b/usr.sbin/snmpd/pf.c index 9b38a29f86f..9700a496937 100644 --- a/usr.sbin/snmpd/pf.c +++ b/usr.sbin/snmpd/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.3 2012/05/26 14:45:55 joel Exp $ */ +/* $OpenBSD: pf.c,v 1.4 2012/05/28 20:55:40 joel Exp $ */ /* * Copyright (c) 2012 Joel Knight <joel@openbsd.org> @@ -59,13 +59,11 @@ size_t buf_esize[PFRB_MAX] = { 0, sizeof(struct pfi_kif), sizeof(struct pfioc_trans_e) }; -int +void pf_init(void) { if ((devpf = open("/dev/pf", O_RDONLY)) == -1) - return (1); - - return (0); + fatal("pf_init"); } int |