From: Jonathan Lebon Date: Sun, 28 May 2023 22:37:48 +0000 (-0400) Subject: lib/deploy: Rename variable for clarity X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~1^2~33^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=76649127d1f415abdfd2e8de62ce8a2beef5f412;p=ostree.git lib/deploy: Rename variable for clarity `size_to_remove` looks cryptic in contrast to `new_new_bootcsum_dirs_total_size`. Rename it in the style of the latter for easier reading. --- diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 7de6fdf3..450f593e 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2567,14 +2567,14 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment /* OK, we would fail if we tried to write the new bootdirs. Is it salvageable? * First, calculate how much space we could save with the bootcsums scheduled * for removal. */ - guint64 size_to_remove = 0; + guint64 bootcsum_dirs_to_remove_total_size = 0; GLNX_HASH_TABLE_FOREACH_KV (current_bootcsums, const char *, bootcsum, gpointer, sizep) { if (!g_hash_table_contains (new_bootcsums, bootcsum)) - size_to_remove += GPOINTER_TO_UINT (sizep); + bootcsum_dirs_to_remove_total_size += GPOINTER_TO_UINT (sizep); } - if (net_new_bootcsum_dirs_total_size > (available_size + size_to_remove)) + if (net_new_bootcsum_dirs_total_size > (available_size + bootcsum_dirs_to_remove_total_size)) { /* Even if we auto-pruned, the new bootdirs wouldn't fit. Just let the * code continue and let it hit ENOSPC. */