Lines Matching refs:rules
41 struct rules { struct
58 static int canid_parse_rule(struct rules *rules, struct bstr *a, int iseff) in canid_parse_rule() argument
72 if (rules->rules_cnt == rules->rules_capacity) { in canid_parse_rule()
73 if (rules->rules_capacity <= EM_CANID_RULES_MAX/2) { in canid_parse_rule()
74 rules->rules_capacity *= 2; in canid_parse_rule()
75 rules->rules_raw = realloc(rules->rules_raw, in canid_parse_rule()
76 sizeof(struct can_filter) * rules->rules_capacity); in canid_parse_rule()
82 rules->rules_raw[rules->rules_cnt].can_id = in canid_parse_rule()
84 rules->rules_raw[rules->rules_cnt].can_mask = in canid_parse_rule()
87 rules->rules_cnt++; in canid_parse_rule()
97 struct rules rules = { in canid_parse_eopt() local
109 rules.rules_raw = calloc(rules.rules_capacity, in canid_parse_eopt()
128 ret = canid_parse_rule(&rules, args, iseff); in canid_parse_eopt()
139 addraw_l(n, MAX_MSG, rules.rules_raw, in canid_parse_eopt()
140 sizeof(struct can_filter) * rules.rules_cnt); in canid_parse_eopt()
144 free(rules.rules_raw); in canid_parse_eopt()