| 1006 | } |
| 1007 | |
| 1008 | void |
| 1009 | table_rule_add(struct table *table, |
| 1010 | struct table_rule *new_rule) |
| 1011 | { |
| 1012 | struct table_rule *existing_rule; |
| 1013 | |
| 1014 | existing_rule = table_rule_find(table, &new_rule->match); |
| 1015 | if (existing_rule == NULL) |
| 1016 | TAILQ_INSERT_TAIL(&table->rules, new_rule, node); |
| 1017 | else { |
| 1018 | TAILQ_INSERT_AFTER(&table->rules, existing_rule, new_rule, node); |
| 1019 | TAILQ_REMOVE(&table->rules, existing_rule, node); |
| 1020 | free(existing_rule); |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | void |
| 1025 | table_rule_add_bulk(struct table *table, |
no test coverage detected