Skip to content

Commit

Permalink
resolvectl: fix type of ifindex D-Bus field, and make sure to initial…
Browse files Browse the repository at this point in the history
…ize to zero in all code paths
  • Loading branch information
poettering committed Jan 4, 2023
1 parent de712a8 commit a5e6c84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resolve/resolvectl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,10 @@ static int reset_server_features(int argc, char **argv, void *userdata) {
static int read_dns_server_one(sd_bus_message *m, bool with_ifindex, bool extended, char **ret) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_free_ char *pretty = NULL;
int ifindex, family, r, k;
union in_addr_union a;
const char *name = NULL;
int32_t ifindex = 0;
int family, r, k;
uint16_t port = 0;

assert(m);
Expand Down

0 comments on commit a5e6c84

Please sign in to comment.