summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2019-04-03 20:37:14 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2019-04-03 20:37:14 +0000
commit0a17b9e03e8402aa912c398e98b48c8b3b4ee232 (patch)
tree7e47e98966309e3563370911a26e860290627100
parentfd29ff5d53f0dd52e7914a3534ceb94c2ba26c7c (diff)
downloadsrc-test2-0a17b9e03e8402aa912c398e98b48c8b3b4ee232.tar.gz
src-test2-0a17b9e03e8402aa912c398e98b48c8b3b4ee232.zip
Notes
-rw-r--r--usr.bin/rctl/rctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/rctl/rctl.c b/usr.bin/rctl/rctl.c
index 74073c13207e..5999afe28b1f 100644
--- a/usr.bin/rctl/rctl.c
+++ b/usr.bin/rctl/rctl.c
@@ -378,8 +378,9 @@ print_rules(char *rules, int hflag, int nflag)
static void
enosys(void)
{
- int error, racct_enable;
size_t racct_enable_len;
+ int error;
+ bool racct_enable;
racct_enable_len = sizeof(racct_enable);
error = sysctlbyname("kern.racct.enable",
@@ -392,7 +393,7 @@ enosys(void)
err(1, "sysctlbyname");
}
- if (racct_enable == 0)
+ if (!racct_enable)
errx(1, "RACCT/RCTL present, but disabled; enable using kern.racct.enable=1 tunable");
}