mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
networkd: fix two format string mismatches
../src/network/networkd-link.c:3577:84: warning: format specifies type 'unsigned char' but the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] route->dst_prefixlen, route->tos, route->priority, route->table, route->lifetime); ^~~~~~~~~~~~ ../src/network/networkd-manager.c:1146:132: warning: format specifies type 'unsigned char' but the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] rule->from_prefixlen, space ? " " : "", to_str, rule->to_prefixlen, rule->tos, rule->fwmark, rule->fwmask, rule->table); ^~~~~~~~~~~ Also add some line breaks to make it easier to see which argument is for which part of the format string.
This commit is contained in:
parent
3dad3203ab
commit
ecc3f340ab
@ -3573,7 +3573,8 @@ int link_save(Link *link) {
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
fprintf(f, "%s%s/%hhu/%hhu/%"PRIu32"/%hhu/"USEC_FMT, space ? " " : "", route_str,
|
||||
fprintf(f, "%s%s/%hhu/%hhu/%"PRIu32"/%"PRIu32"/"USEC_FMT,
|
||||
space ? " " : "", route_str,
|
||||
route->dst_prefixlen, route->tos, route->priority, route->table, route->lifetime);
|
||||
space = true;
|
||||
}
|
||||
|
@ -1142,8 +1142,12 @@ static int manager_save(Manager *m) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
fprintf(f, "from=%s%s/%hhu to=%s%s/%hhu tos=%hhu fwmark=%"PRIu32"/%"PRIu32" table=%hhu", space ? " " : "", from_str,
|
||||
rule->from_prefixlen, space ? " " : "", to_str, rule->to_prefixlen, rule->tos, rule->fwmark, rule->fwmask, rule->table);
|
||||
fprintf(f, "from=%s%s/%hhu to=%s%s/%hhu tos=%hhu fwmark=%"PRIu32"/%"PRIu32" table=%"PRIu32,
|
||||
space ? " " : "", from_str, rule->from_prefixlen,
|
||||
space ? " " : "", to_str, rule->to_prefixlen,
|
||||
rule->tos,
|
||||
rule->fwmark, rule->fwmask,
|
||||
rule->table);
|
||||
|
||||
fputc('\n', f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user