lib/deploy: Rename variable for clarity
authorJonathan Lebon <jonathan@jlebon.com>
Sun, 28 May 2023 22:37:48 +0000 (18:37 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Sun, 28 May 2023 22:39:03 +0000 (18:39 -0400)
`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.

src/libostree/ostree-sysroot-deploy.c

index 7de6fdf31cc15d29d94bedf2bf9510c5891e0f53..450f593e631c6c8057979a5ef19317cf51ef3b4f 100644 (file)
@@ -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. */