cleanup: bugprone argument issues (#37346)
Follow up from https://github.com/systemd/systemd/pull/37281
This commit is contained in:
@@ -114,7 +114,7 @@ int ndisc_router_parse(sd_ndisc *nd, sd_ndisc_router *rt) {
|
||||
rt->hop_limit = a->nd_ra_curhoplimit;
|
||||
rt->flags = a->nd_ra_flags_reserved; /* the first 8 bits */
|
||||
rt->lifetime_usec = be16_sec_to_usec(a->nd_ra_router_lifetime, /* max_as_infinity = */ false);
|
||||
rt->reachable_time_usec = be32_msec_to_usec(a->nd_ra_reachable, /* mas_as_infinity = */ false);
|
||||
rt->reachable_time_usec = be32_msec_to_usec(a->nd_ra_reachable, /* max_as_infinity = */ false);
|
||||
rt->retransmission_time_usec = be32_msec_to_usec(a->nd_ra_retransmit, /* max_as_infinity = */ false);
|
||||
|
||||
/* RFC 4191 section 2.2
|
||||
|
||||
@@ -588,7 +588,7 @@ static int link_set_ipv6_mtu_async_impl(Link *link) {
|
||||
link->manager->event, &link->ipv6_mtu_wait_synced_event_source,
|
||||
CLOCK_BOOTTIME, 100 * USEC_PER_MSEC, 0,
|
||||
ipv6_mtu_wait_synced_handler, link,
|
||||
/* priority = */ 0, "ipv6-mtu-wait-synced", /* force = */ true);
|
||||
/* priority = */ 0, "ipv6-mtu-wait-synced", /* force_reset = */ true);
|
||||
if (r < 0)
|
||||
return log_link_warning_errno(link, r, "Failed to configure timer event source for waiting for IPv6 MTU being synced: %m");
|
||||
|
||||
|
||||
@@ -2364,7 +2364,7 @@ int dns_packet_read_rr(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = dns_packet_read_name(p, &rr->naptr.replacement, /* allow_compressed= */ false, NULL);
|
||||
r = dns_packet_read_name(p, &rr->naptr.replacement, /* allow_compression= */ false, NULL);
|
||||
break;
|
||||
|
||||
case DNS_TYPE_OPT: /* we only care about the header of OPT for now. */
|
||||
|
||||
@@ -2074,7 +2074,7 @@ static int dns_transaction_make_packet(DnsTransaction *t) {
|
||||
r = dns_packet_new_query(
|
||||
&p, t->scope->protocol,
|
||||
/* min_alloc_dsize = */ 0,
|
||||
/* dnssec_cd = */ !FLAGS_SET(t->query_flags, SD_RESOLVED_NO_VALIDATE) &&
|
||||
/* dnssec_checking_disabled = */ !FLAGS_SET(t->query_flags, SD_RESOLVED_NO_VALIDATE) &&
|
||||
t->scope->dnssec_mode != DNSSEC_NO);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -128,7 +128,7 @@ int bus_test_polkit(
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *request = NULL, *reply = NULL;
|
||||
int authorized = false, challenge = false;
|
||||
|
||||
r = bus_message_new_polkit_auth_call_for_bus(call, action, details, /* interactive = */ false, &request);
|
||||
r = bus_message_new_polkit_auth_call_for_bus(call, action, details, /* flags = */ 0, &request);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ int sethostname_idempotent(const char *s);
|
||||
int shorten_overlong(const char *s, char **ret);
|
||||
|
||||
int read_etc_hostname_stream(FILE *f, bool substitute_wildcards, char **ret);
|
||||
int read_etc_hostname(const char *path, bool substitue_wildcards, char **ret);
|
||||
int read_etc_hostname(const char *path, bool substitute_wildcards, char **ret);
|
||||
|
||||
void hostname_update_source_hint(const char *hostname, HostnameSource source);
|
||||
int hostname_setup(bool really);
|
||||
|
||||
@@ -49,7 +49,7 @@ int mount_verbose_full(
|
||||
int error_log_level,
|
||||
const char *what,
|
||||
const char *where,
|
||||
const char *type,
|
||||
const char *fstype,
|
||||
unsigned long flags,
|
||||
const char *options,
|
||||
bool follow_symlink);
|
||||
@@ -58,20 +58,20 @@ static inline int mount_follow_verbose(
|
||||
int error_log_level,
|
||||
const char *what,
|
||||
const char *where,
|
||||
const char *type,
|
||||
const char *fstype,
|
||||
unsigned long flags,
|
||||
const char *options) {
|
||||
return mount_verbose_full(error_log_level, what, where, type, flags, options, true);
|
||||
return mount_verbose_full(error_log_level, what, where, fstype, flags, options, true);
|
||||
}
|
||||
|
||||
static inline int mount_nofollow_verbose(
|
||||
int error_log_level,
|
||||
const char *what,
|
||||
const char *where,
|
||||
const char *type,
|
||||
const char *fstype,
|
||||
unsigned long flags,
|
||||
const char *options) {
|
||||
return mount_verbose_full(error_log_level, what, where, type, flags, options, false);
|
||||
return mount_verbose_full(error_log_level, what, where, fstype, flags, options, false);
|
||||
}
|
||||
|
||||
int umount_verbose(
|
||||
|
||||
@@ -972,7 +972,7 @@ static int context_on_acquire_progress(const Transfer *t, const Instance *inst,
|
||||
assert(overall <= 100);
|
||||
|
||||
log_debug("Transfer %zu/%zu is %u%% complete (%u%% overall).", i+1, n, percentage, overall);
|
||||
return sd_notifyf(/* unset= */ false, "X_SYSUPDATE_PROGRESS=%u\n"
|
||||
return sd_notifyf(/* unset_environment=*/ false, "X_SYSUPDATE_PROGRESS=%u\n"
|
||||
"X_SYSUPDATE_TRANSFERS_LEFT=%zu\n"
|
||||
"X_SYSUPDATE_TRANSFERS_DONE=%zu\n"
|
||||
"STATUS=Updating to '%s' (%u%% complete).",
|
||||
@@ -1029,7 +1029,7 @@ static int context_apply(
|
||||
|
||||
log_info("Selected update '%s' for install.", us->version);
|
||||
|
||||
(void) sd_notifyf(/* unset= */ false,
|
||||
(void) sd_notifyf(/* unset_environment=*/ false,
|
||||
"READY=1\n"
|
||||
"X_SYSUPDATE_VERSION=%s\n"
|
||||
"STATUS=Making room for '%s'.", us->version, us->version);
|
||||
@@ -1047,7 +1047,7 @@ static int context_apply(
|
||||
if (arg_sync)
|
||||
sync();
|
||||
|
||||
(void) sd_notifyf(/* unset= */ false,
|
||||
(void) sd_notifyf(/* unset_environment=*/ false,
|
||||
"STATUS=Updating to '%s'.", us->version);
|
||||
|
||||
/* There should now be one instance picked for each transfer, and the order is the same */
|
||||
@@ -1072,7 +1072,7 @@ static int context_apply(
|
||||
if (arg_sync)
|
||||
sync();
|
||||
|
||||
(void) sd_notifyf(/* unset= */ false,
|
||||
(void) sd_notifyf(/* unset_environment=*/ false,
|
||||
"STATUS=Installing '%s'.", us->version);
|
||||
|
||||
for (size_t i = 0; i < c->n_transfers; i++) {
|
||||
|
||||
@@ -234,7 +234,7 @@ void manager_exit(Manager *manager) {
|
||||
|
||||
manager->exit = true;
|
||||
|
||||
(void) sd_notify(/* unset= */ false, NOTIFY_STOPPING_MESSAGE);
|
||||
(void) sd_notify(/* unset_environment= */ false, NOTIFY_STOPPING_MESSAGE);
|
||||
|
||||
/* close sources of new events and discard buffered events */
|
||||
manager->ctrl = udev_ctrl_unref(manager->ctrl);
|
||||
@@ -261,7 +261,7 @@ void notify_ready(Manager *manager) {
|
||||
|
||||
assert(manager);
|
||||
|
||||
r = sd_notifyf(/* unset= */ false,
|
||||
r = sd_notifyf(/* unset_environment= */ false,
|
||||
"READY=1\n"
|
||||
"STATUS=Processing with %u children at max", manager->config.children_max);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user