From: Stefan Rinkes Date: Thu, 14 Apr 2011 20:08:53 +0000 (+0200) Subject: pf plugin: whitespace cleanup X-Git-Tag: collectd-5.2.0~12^2~25 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=59fc91adb22eeaff143f629cd5e7727732708f6e;p=collectd.git pf plugin: whitespace cleanup --- diff --git a/src/pf.c b/src/pf.c index a52bc9e4..b4d2a458 100644 --- a/src/pf.c +++ b/src/pf.c @@ -44,14 +44,14 @@ typedef u_int64_t counter_t; #define PF_SOCKET "/dev/pf" struct pfdata { - int pd_dev; + int pd_dev; }; static struct pfdata pd; -static int pf_init(void); -static int pf_read(void); -static void submit_counter(const char *, const char *, counter_t); +static int pf_init(void); +static int pf_read(void); +static void submit_counter(const char *, const char *, counter_t); void submit_counter(const char *type, const char *inst, counter_t val) @@ -88,22 +88,23 @@ pf_init(void) if (ioctl(pd.pd_dev, DIOCGETSTATUS, &status) == -1) { return (-1); } - close(pd.pd_dev); + + close(pd.pd_dev); if (!status.running) return (-1); - + return (0); } int pf_read(void) { - int i; - struct pf_status status; + int i; + struct pf_status status; - char *cnames[] = PFRES_NAMES; - char *lnames[] = LCNT_NAMES; - char *names[] = { "searches", "inserts", "removals" }; + char *cnames[] = PFRES_NAMES; + char *lnames[] = LCNT_NAMES; + char *names[] = { "searches", "inserts", "removals" }; if ((pd.pd_dev = open(PF_SOCKET, O_RDWR)) == -1) { return (-1); @@ -111,7 +112,8 @@ pf_read(void) if (ioctl(pd.pd_dev, DIOCGETSTATUS, &status) == -1) { return (-1); } - close(pd.pd_dev); + + close(pd.pd_dev); for (i = 0; i < PFRES_MAX; i++) submit_counter("pf_counters", cnames[i], status.counters[i]); for (i = 0; i < LCNT_MAX; i++)