summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;