]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran: Fix coding style around free()
authorBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Mon, 8 May 2023 07:45:19 +0000 (09:45 +0200)
committerBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Mon, 8 May 2023 08:46:47 +0000 (10:46 +0200)
Fix coding-style errors introduced in ca2f64d5d08c1699ca4b7cb2bf6a76692e809e0f

gcc/fortran/ChangeLog:

* resolve.cc (resolve_select_type): Fix coding style.

libgfortran/ChangeLog:

* caf/single.c (_gfortran_caf_register): Fix coding style.
* io/async.c (update_pdt, async_io): Likewise.
* io/format.c (free_format_data): Likewise.
* io/transfer.c (st_read_done_worker, st_write_done_worker): Likewise.
* io/unix.c (mem_close): Likewise.

gcc/fortran/resolve.cc
libgfortran/caf/single.c
libgfortran/io/async.c
libgfortran/io/format.c
libgfortran/io/transfer.c
libgfortran/io/unix.c

index 3a09de18346e8bbd79ac4ed02de4b99183d30dbc..58f05a3e74abca052f667ed3788f8a6de2a6c106 100644 (file)
@@ -9931,7 +9931,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
   gfc_resolve_blocks (code->block, gfc_current_ns);
   gfc_current_ns = old_ns;
 
-  free(ref);
+  free (ref);
 }
 
 
index fea8b0cc204c4e09295f05393e33fabe0c74a50e..c100d883aae7107be306116a2b6522c0f771358b 100644 (file)
@@ -163,8 +163,8 @@ _gfortran_caf_register (size_t size, caf_register_t type, caf_token_t *token,
       /* Freeing the memory conditionally seems pointless, but
         caf_internal_error () may return, when a stat is given and then the
         memory may be lost.  */
-      free(local);
-      free(*token);
+      free (local);
+      free (*token);
       caf_internal_error (alloc_fail_msg, stat, errmsg, errmsg_len);
       return;
     }
index 01adf8f3f7837705ffdb0952fa159b03185dfb24..57097438e8934521de5687d2e02738260f84ebd2 100644 (file)
@@ -71,7 +71,7 @@ update_pdt (st_parameter_dt **old, st_parameter_dt *new) {
   NOTE ("Changing pdts, current_unit = %p", (void *) (new->u.p.current_unit));
   temp = *old;
   *old = new;
-  free(temp);
+  free (temp);
 }
 
 /* Destroy an adv_cond structure.  */
@@ -105,7 +105,7 @@ async_io (void *arg)
       /* Loop over the queue entries until they are finished.  */
       while (ctq)
        {
-         free(prev);
+         free (prev);
          prev = ctq;
          if (!au->error.has_error)
            {
index 66acbf04d08618fa52edd51e8ba1b66056ee6309..f5fe2e464d50b7fc7e72a7f767116dfb95de7519 100644 (file)
@@ -269,7 +269,7 @@ free_format_data (format_data *fmt)
        fnp->format != FMT_NONE; fnp++)
     if (fnp->format == FMT_DT)
        {
-         free(GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist));
+         free (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist));
          free (fnp->u.udf.vlist);
        }
 
index 19b0b9a9324778e50c1b0befeaa5ccb89316188d..0104f6ccd696f65dae6747fd04540917505e58ba 100644 (file)
@@ -4522,7 +4522,7 @@ st_read_done_worker (st_parameter_dt *dtp, bool unlock)
            {
              free (dtp->u.p.current_unit->filename);
              dtp->u.p.current_unit->filename = NULL;
-             free(dtp->u.p.current_unit->ls);
+             free (dtp->u.p.current_unit->ls);
              dtp->u.p.current_unit->ls = NULL;
            }
          free_newunit = true;
@@ -4618,7 +4618,7 @@ st_write_done_worker (st_parameter_dt *dtp, bool unlock)
            {
              free (dtp->u.p.current_unit->filename);
              dtp->u.p.current_unit->filename = NULL;
-             free(dtp->u.p.current_unit->ls);
+             free (dtp->u.p.current_unit->ls);
              dtp->u.p.current_unit->ls = NULL;
            }
          free_newunit = true;
index ef35b85570facd79b131fc8d5b8e4d8a94975858..d466df979dff7cd7e2d924ec141b890d526b8a62 100644 (file)
@@ -1028,7 +1028,7 @@ mem_flush (unix_stream *s __attribute__ ((unused)))
 static int
 mem_close (unix_stream *s)
 {
-  free(s);
+  free (s);
   return 0;
 }