From 4ae1589249e57d03925a996890b9a5b1b084634a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 21 Jun 2025 13:16:46 +0900 Subject: [PATCH] tree-wide: reindent arguments of conf parsers Also fixes 'const char* unit' -> 'const char *unit'. --- src/core/load-fragment.c | 146 +++++++++++++++-------------- src/journal/journald-manager.c | 6 +- src/login/logind-user.c | 2 +- src/network/netdev/tunnel.c | 14 +-- src/network/networkd-can.c | 10 +- src/network/networkd-dhcp-common.c | 6 +- src/network/networkd-dhcp6.c | 2 +- src/network/networkd-ipv4ll.c | 4 +- src/network/networkd-sysctl.c | 2 +- 9 files changed, 99 insertions(+), 93 deletions(-) diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index fd78e4374fd..28bd91fa1fc 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -737,7 +737,7 @@ int config_parse_exec_nice( } int config_parse_exec_oom_score_adjust( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -776,7 +776,7 @@ int config_parse_exec_oom_score_adjust( } int config_parse_exec_coredump_filter( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -814,7 +814,7 @@ int config_parse_exec_coredump_filter( } int config_parse_kill_mode( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -1071,7 +1071,7 @@ int config_parse_exec( } int config_parse_socket_bindtodevice( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -1428,16 +1428,17 @@ int config_parse_exec_output( return 0; } -int config_parse_exec_io_class(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_exec_io_class( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { ExecContext *c = ASSERT_PTR(data); int x; @@ -1464,16 +1465,17 @@ int config_parse_exec_io_class(const char *unit, return 0; } -int config_parse_exec_io_priority(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_exec_io_priority( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { ExecContext *c = ASSERT_PTR(data); int i, r; @@ -1500,16 +1502,17 @@ int config_parse_exec_io_priority(const char *unit, return 0; } -int config_parse_exec_cpu_sched_policy(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_exec_cpu_sched_policy( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { ExecContext *c = ASSERT_PTR(data); int x; @@ -1577,16 +1580,17 @@ int config_parse_numa_mask( config_parse_cpu_set(unit, filename, line, section, section_line, lvalue, ltype, rvalue, data, userdata); } -int config_parse_exec_cpu_sched_prio(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_exec_cpu_sched_prio( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { ExecContext *c = ASSERT_PTR(data); int i, r; @@ -2162,16 +2166,17 @@ int config_parse_trigger_unit( return 0; } -int config_parse_path_spec(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_path_spec( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { Path *p = ASSERT_PTR(data); PathSpec *s; @@ -2651,16 +2656,17 @@ int config_parse_working_directory( return 0; } -int config_parse_unit_env_file(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_unit_env_file( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { char ***env = ASSERT_PTR(data); const Unit *u = userdata; @@ -5449,7 +5455,7 @@ int config_parse_extension_images( } int config_parse_job_timeout_sec( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -5487,7 +5493,7 @@ int config_parse_job_timeout_sec( } int config_parse_job_running_timeout_sec( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -5519,7 +5525,7 @@ int config_parse_job_running_timeout_sec( } int config_parse_emergency_action( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -6264,7 +6270,7 @@ void unit_dump_config_items(FILE *f) { } int config_parse_show_status( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -6290,7 +6296,7 @@ int config_parse_show_status( } int config_parse_output_restricted( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -6337,7 +6343,7 @@ int config_parse_output_restricted( } int config_parse_crash_chvt( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/journal/journald-manager.c b/src/journal/journald-manager.c index f6159fb2b66..3443e6a965c 100644 --- a/src/journal/journald-manager.c +++ b/src/journal/journald-manager.c @@ -2814,7 +2814,7 @@ DEFINE_STRING_TABLE_LOOKUP(split_mode, SplitMode); DEFINE_CONFIG_PARSE_ENUM(config_parse_split_mode, split_mode, SplitMode); int config_parse_line_max( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -2865,7 +2865,7 @@ int config_parse_line_max( } int config_parse_compress( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -2910,7 +2910,7 @@ int config_parse_compress( } int config_parse_forward_to_socket( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 5c423c21dd6..49d51952e98 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -978,7 +978,7 @@ static const char* const user_gc_mode_table[_USER_GC_MODE_MAX] = { DEFINE_STRING_TABLE_LOOKUP(user_gc_mode, UserGCMode); int config_parse_tmpfs_size( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c index 29f353d8490..5c795337a2f 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -904,7 +904,7 @@ int config_parse_tunnel_key( } int config_parse_ipv6_flowlabel( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -941,7 +941,7 @@ int config_parse_ipv6_flowlabel( } int config_parse_encap_limit( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -976,7 +976,7 @@ int config_parse_encap_limit( } int config_parse_6rd_prefix( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -1013,7 +1013,7 @@ int config_parse_6rd_prefix( } int config_parse_erspan_version( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -1042,7 +1042,7 @@ int config_parse_erspan_version( } int config_parse_erspan_index( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -1071,7 +1071,7 @@ int config_parse_erspan_index( } int config_parse_erspan_direction( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -1100,7 +1100,7 @@ int config_parse_erspan_direction( } int config_parse_erspan_hwid( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/network/networkd-can.c b/src/network/networkd-can.c index 96f503ca3a0..2f58c49798d 100644 --- a/src/network/networkd-can.c +++ b/src/network/networkd-can.c @@ -132,7 +132,7 @@ int can_set_netlink_message(Link *link, sd_netlink_message *m) { } int config_parse_can_bitrate( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -171,7 +171,7 @@ int config_parse_can_bitrate( } int config_parse_can_time_quanta( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -208,7 +208,7 @@ int config_parse_can_time_quanta( } int config_parse_can_restart_usec( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -245,7 +245,7 @@ int config_parse_can_restart_usec( } int config_parse_can_control_mode( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -284,7 +284,7 @@ int config_parse_can_control_mode( } int config_parse_can_termination( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c index 74555cf78fa..2d8ee46ad9b 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -338,7 +338,7 @@ int link_get_captive_portal(Link *link, const char **ret) { } int config_parse_dhcp( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -383,7 +383,7 @@ int config_parse_dhcp( } int config_parse_dhcp_route_metric( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -492,7 +492,7 @@ int config_parse_ndisc_route_metric( } int config_parse_dhcp_send_hostname( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index 4806980993a..89637fc1e72 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -894,7 +894,7 @@ int link_serialize_dhcp6_client(Link *link, FILE *f) { } int config_parse_dhcp6_pd_prefix_hint( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c index ff8a17211e4..94fa25a4f07 100644 --- a/src/network/networkd-ipv4ll.c +++ b/src/network/networkd-ipv4ll.c @@ -346,7 +346,7 @@ int ipv4ll_update_mac(Link *link) { } int config_parse_ipv4ll( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, @@ -387,7 +387,7 @@ int config_parse_ipv4ll( } int config_parse_ipv4ll_address( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c index b37f24c5bc1..efb9f45df9a 100644 --- a/src/network/networkd-sysctl.c +++ b/src/network/networkd-sysctl.c @@ -783,7 +783,7 @@ DEFINE_STRING_TABLE_LOOKUP(ip_reverse_path_filter, IPReversePathFilter); DEFINE_CONFIG_PARSE_ENUM(config_parse_ip_reverse_path_filter, ip_reverse_path_filter, IPReversePathFilter); int config_parse_ip_forward_deprecated( - const char* unit, + const char *unit, const char *filename, unsigned line, const char *section, -- 2.47.3