summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2019-09-02 17:44:07 +0200
committerFrancesco Giudici <fgiudici@redhat.com>2019-09-06 12:30:39 +0200
commita1abb490aafd5f859c69d7865d296522aef9166a (patch)
treef47100b09dfd5268fbb82baadaad1d45bb4ad252
parent462e927e4f34c1e35793c0146ab595ac28a95a11 (diff)
downloadNetworkManager-fg/nettools_dhcp_options_II.tar.gz
dhcp: nettools: drop useless "options" GHashTable checksfg/nettools_dhcp_options_II
-rw-r--r--src/dhcp/nm-dhcp-nettools.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c
index b26cf942b2..cd74cdd82d 100644
--- a/src/dhcp/nm-dhcp-nettools.c
+++ b/src/dhcp/nm-dhcp-nettools.c
@@ -866,13 +866,10 @@ lease_parse_private_options (NDhcp4ClientLease *lease,
continue;
option_string = nm_utils_bin2hexstr_full (data, n_data, ':', FALSE, NULL);
- if (options) {
- nm_dhcp_option_take_option (options,
- _nm_dhcp_option_dhcp4_options,
- i,
- g_steal_pointer (&option_string));
- }
-
+ nm_dhcp_option_take_option (options,
+ _nm_dhcp_option_dhcp4_options,
+ i,
+ g_steal_pointer (&option_string));
}
}
@@ -892,7 +889,7 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx,
g_return_val_if_fail (lease != NULL, NULL);
ip4_config = nm_ip4_config_new (multi_idx, ifindex);
- options = out_options ? nm_dhcp_option_create_options_dict () : NULL;
+ options = nm_dhcp_option_create_options_dict ();
if (!lease_parse_address (lease, ip4_config, options, error))
return NULL;