}
static int match_add(sd_bus_slot *slots, struct bus_match_node *root, const char *match, int value) {
- struct bus_match_component *components = NULL;
- unsigned n_components = 0;
+ struct bus_match_component *components;
+ unsigned n_components;
sd_bus_slot *s;
int r;
s = slots + value;
- zero(*s);
r = bus_match_parse(match, &components, &n_components);
if (r < 0)
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
- enum bus_match_node_type i;
- sd_bus_slot slots[19];
+ sd_bus_slot slots[19] = {};
int r;
test_setup_logging(LOG_INFO);
assert_se(bus_match_run(NULL, &root, m) == 0);
assert_se(mask_contains((unsigned[]) { 9, 5, 10, 12, 14, 7, 15, 16, 17 }, 9));
- for (i = 0; i < _BUS_MATCH_NODE_TYPE_MAX; i++) {
+ for (enum bus_match_node_type i = 0; i < _BUS_MATCH_NODE_TYPE_MAX; i++) {
char buf[32];
const char *x;