]> Kevux Git Server - fll/commitdiff
Cleanup: Surround constant variable in a scoped block.
authorKevin Day <kevin@kevux.org>
Sun, 6 Aug 2023 00:36:16 +0000 (19:36 -0500)
committerKevin Day <kevin@kevux.org>
Sun, 6 Aug 2023 00:36:16 +0000 (19:36 -0500)
level_0/f_memory/c/memory/private-array.c

index daf0d2f25d4e042bcfcb20f794914febd084201d..6d0b7f6916b6f531e3d7e2280a73958b4efbbca1 100644 (file)
@@ -9,8 +9,10 @@ extern "C" {
 #if !defined(_di_f_memory_array_adjust_) || !defined(_di_f_memory_array_decimate_by_)
   f_status_t private_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
 
-    const f_status_t status = private_f_memory_adjust(*size, length, width, array);
-    if (F_status_is_error(status)) return status;
+    {
+      const f_status_t status = private_f_memory_adjust(*size, length, width, array);
+      if (F_status_is_error(status)) return status;
+    }
 
     *size = length;
 
@@ -25,8 +27,10 @@ extern "C" {
 #if !defined(_di_f_memory_array_append_) || !defined(_di_f_memory_array_append_all_) || !defined(_di_f_memory_array_decrease_by_) || !defined(_di_f_memory_array_increase_) || !defined(_di_f_memory_array_increase_by_) || !defined(_di_f_memory_array_resize_)
   f_status_t private_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
 
-    const f_status_t status = private_f_memory_resize(*size, length, width, array);
-    if (F_status_is_error(status)) return status;
+    {
+      const f_status_t status = private_f_memory_resize(*size, length, width, array);
+      if (F_status_is_error(status)) return status;
+    }
 
     *size = length;