I can't believe that no-one noticed that I broke ipfw table del

for over a month!
put {}  around if clause with multiple statements
This commit is contained in:
Julian Elischer 2006-03-31 12:40:09 +00:00
parent a1d444e140
commit dbadd6b028
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157332

View File

@ -4820,12 +4820,13 @@ table_handler(int ac, char *av[])
err(EX_OSERR, "setsockopt(IP_FW_TABLE_%s)",
do_add ? "ADD" : "DEL");
/* In silent mode, react to a failed add by deleting */
if (do_add)
if (do_add) {
do_cmd(IP_FW_TABLE_DEL, &ent, sizeof(ent));
if (do_cmd(IP_FW_TABLE_ADD,
&ent, sizeof(ent)) < 0)
err(EX_OSERR,
"setsockopt(IP_FW_TABLE_ADD)");
}
} else if (_substrcmp(*av, "flush") == 0) {
if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, sizeof(ent.tbl)) < 0)
err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)");