diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-01-04 16:29:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-01-04 16:29:34 +0100 |
commit | a5e6c8498ca375bafa865d5e46fa95e9313871ad (patch) | |
tree | bae7fec0d0a831db455b7a62c9e70333a3aeb38e /src/resolve | |
parent | hwdb: remove spurious whitespace (diff) | |
download | systemd-a5e6c8498ca375bafa865d5e46fa95e9313871ad.tar.xz systemd-a5e6c8498ca375bafa865d5e46fa95e9313871ad.zip |
resolvectl: fix type of ifindex D-Bus field, and make sure to initialize to zero in all code paths
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolvectl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index 5889bd772f..4d2d9a1e17 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -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); |