summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-10-25 10:02:11 +0200
committerThomas Haller <thaller@redhat.com>2018-11-13 19:09:34 +0100
commitce1cfd7232273dcb577f9fc783b7694dd191ae86 (patch)
tree7ce20383d0a3bae975888ce8739641e7bdad5597
parentd6d2b7296fb1ddac06e167c3ec398e1c0ceff41c (diff)
downloadNetworkManager-ce1cfd7232273dcb577f9fc783b7694dd191ae86.tar.gz
dhcp/trivial: wrap lines in calling client_start()
A possible issue is that client_start() has about 136 arguments. It doesn't get simpler by saving lines of code and writing them all in the same line. Wrap the lines. While at it, use "FALSE" for "enforce_duid" argument, instead of "0". It's a boolean.
-rw-r--r--src/dhcp/nm-dhcp-dhclient.c14
-rw-r--r--src/dhcp/nm-dhcp-manager.c50
2 files changed, 54 insertions, 10 deletions
diff --git a/src/dhcp/nm-dhcp-dhclient.c b/src/dhcp/nm-dhcp-dhclient.c
index 18aa6a7fed..0146c8b465 100644
--- a/src/dhcp/nm-dhcp-dhclient.c
+++ b/src/dhcp/nm-dhcp-dhclient.c
@@ -322,8 +322,18 @@ create_dhclient_config (NMDhcpDhclient *self,
else
_LOGD ("no existing dhclient configuration to merge");
- if (!merge_dhclient_config (self, addr_family, iface, new, client_id, dhcp_anycast_addr,
- hostname, timeout, use_fqdn, orig, out_new_client_id, &error)) {
+ if (!merge_dhclient_config (self,
+ addr_family,
+ iface,
+ new,
+ client_id,
+ dhcp_anycast_addr,
+ hostname,
+ timeout,
+ use_fqdn,
+ orig,
+ out_new_client_id,
+ &error)) {
_LOGW ("error creating dhclient configuration: %s", error->message);
g_clear_error (&error);
}
diff --git a/src/dhcp/nm-dhcp-manager.c b/src/dhcp/nm-dhcp-manager.c
index 372f241d47..8e90f00bb8 100644
--- a/src/dhcp/nm-dhcp-manager.c
+++ b/src/dhcp/nm-dhcp-manager.c
@@ -311,10 +311,27 @@ nm_dhcp_manager_start_ip4 (NMDhcpManager *self,
}
}
- return client_start (self, AF_INET, multi_idx, iface, ifindex, hwaddr, uuid,
- route_table, route_metric, NULL,
- dhcp_client_id, 0, timeout, dhcp_anycast_addr, hostname,
- use_fqdn, FALSE, 0, last_ip_address, 0, error);
+ return client_start (self,
+ AF_INET,
+ multi_idx,
+ iface,
+ ifindex,
+ hwaddr,
+ uuid,
+ route_table,
+ route_metric,
+ NULL,
+ dhcp_client_id,
+ FALSE,
+ timeout,
+ dhcp_anycast_addr,
+ hostname,
+ use_fqdn,
+ FALSE,
+ 0,
+ last_ip_address,
+ 0,
+ error);
}
/* Caller owns a reference to the NMDhcpClient on return */
@@ -349,10 +366,27 @@ nm_dhcp_manager_start_ip6 (NMDhcpManager *self,
/* Always prefer the explicit dhcp-hostname if given */
hostname = dhcp_hostname ?: priv->default_hostname;
}
- return client_start (self, AF_INET6, multi_idx, iface, ifindex, hwaddr, uuid,
- route_table, route_metric, ll_addr, duid, enforce_duid,
- timeout, dhcp_anycast_addr, hostname, TRUE, info_only,
- privacy, NULL, needed_prefixes, error);
+ return client_start (self,
+ AF_INET6,
+ multi_idx,
+ iface,
+ ifindex,
+ hwaddr,
+ uuid,
+ route_table,
+ route_metric,
+ ll_addr,
+ duid,
+ enforce_duid,
+ timeout,
+ dhcp_anycast_addr,
+ hostname,
+ TRUE,
+ info_only,
+ privacy,
+ NULL,
+ needed_prefixes,
+ error);
}
void