This diff removes a redundant check from the pfctl_show_rules() function.
There is no functional change, and pfctl still passes all regression tests
with this change.
Comments?
Lawrence
Index: pfctl.c
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl.c,v
retrieving revision 1.310
diff -U8 -p -r1.310 pfctl.c
--- pfctl.c 18 Apr 2012 14:42:17 -0000 1.310
+++ pfctl.c 26 Apr 2012 03:47:34 -0000
@@ -820,18 +820,16 @@ pfctl_show_rules(int dev, char *path, in
if (opts & PF_OPT_SHOWALL) {
pr.rule.action = PF_PASS;
if (ioctl(dev, DIOCGETRULES, &pr)) {
warn("DIOCGETRULES");
ret = -1;
goto error;
}
header++;
- }
- if (opts & PF_OPT_SHOWALL) {
if (format == PFCTL_SHOW_RULES && (pr.nr > 0 || header))
pfctl_print_title("FILTER RULES:");
else if (format == PFCTL_SHOW_LABELS && labels)
pfctl_print_title("LABEL COUNTERS:");
}
if (opts & PF_OPT_CLRRULECTRS)
pr.action = PF_GET_CLR_CNTR;