Changeset View
Changeset View
Standalone View
Standalone View
sys/security/mac_portacl/mac_portacl.c
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
parse_rules(char *string, struct rulehead *head) | parse_rules(char *string, struct rulehead *head) | ||||
{ | { | ||||
struct rule *new; | struct rule *new; | ||||
char *element; | char *element; | ||||
int error; | int error; | ||||
error = 0; | error = 0; | ||||
while ((element = strsep(&string, ",")) != NULL) { | while ((element = strsep(&string, ",")) != NULL) { | ||||
if (strlen(element) == 0) | if (strlen(element) == 0) | ||||
continue; | continue; | ||||
error = parse_rule_element(element, &new); | error = parse_rule_element(element, &new); | ||||
if (error) | if (error) | ||||
goto out; | goto out; | ||||
TAILQ_INSERT_TAIL(head, new, r_entries); | TAILQ_INSERT_TAIL(head, new, r_entries); | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |