tree-wide: port various pieces of code over to UINT32_SCALE_FROM_PERMYRIAD()

This commit is contained in:
Lennart Poettering
2021-02-18 22:36:34 +01:00
parent 3b6e71ad03
commit 9cba32bcde
4 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -549,7 +549,7 @@ static int bus_append_cgroup_property(sd_bus_message *m, const char *field, cons
* size can be determined server-side. */
n = strjoina(field, "Scale");
r = sd_bus_message_append(m, "(sv)", n, "u", (uint32_t) (((uint64_t) r * UINT32_MAX) / 10000U));
r = sd_bus_message_append(m, "(sv)", n, "u", UINT32_SCALE_FROM_PERMYRIAD(r));
if (r < 0)
return bus_log_create_error(r);