/* Get the list of auxiliary groups of the peer */
r = getpeergroups(b->input_fd, &b->groups);
- if (r < 0) {
- if (!IN_SET(r, -EOPNOTSUPP, -ENOPROTOOPT))
- log_debug_errno(r, "Failed to determine peer groups list: %m");
-
- b->n_groups = (size_t) -1;
- } else
+ if (r >= 0)
b->n_groups = (size_t) r;
+ else if (!IN_SET(r, -EOPNOTSUPP, -ENOPROTOOPT))
+ log_debug_errno(r, "Failed to determine peer's group list: %m");
}
static int bus_socket_start_auth_client(sd_bus *b) {