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.
This commit is contained in:
Thomas Haller 2018-10-25 10:02:11 +02:00
parent d6d2b7296f
commit ce1cfd7232
2 changed files with 54 additions and 10 deletions

View file

@ -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);
}

View file

@ -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