fortran: Fix coding style around free()

Fix coding-style errors introduced in ca2f64d5d0

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.
This commit is contained in:
Bernhard Reutner-Fischer 2023-05-08 09:45:19 +02:00
parent 6d6c17e45f
commit c93bde224c
6 changed files with 9 additions and 9 deletions

View File

@ -9931,7 +9931,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
gfc_resolve_blocks (code->block, gfc_current_ns); gfc_resolve_blocks (code->block, gfc_current_ns);
gfc_current_ns = old_ns; gfc_current_ns = old_ns;
free(ref); free (ref);
} }

View 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 /* Freeing the memory conditionally seems pointless, but
caf_internal_error () may return, when a stat is given and then the caf_internal_error () may return, when a stat is given and then the
memory may be lost. */ memory may be lost. */
free(local); free (local);
free(*token); free (*token);
caf_internal_error (alloc_fail_msg, stat, errmsg, errmsg_len); caf_internal_error (alloc_fail_msg, stat, errmsg, errmsg_len);
return; return;
} }

View 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)); NOTE ("Changing pdts, current_unit = %p", (void *) (new->u.p.current_unit));
temp = *old; temp = *old;
*old = new; *old = new;
free(temp); free (temp);
} }
/* Destroy an adv_cond structure. */ /* Destroy an adv_cond structure. */
@ -105,7 +105,7 @@ async_io (void *arg)
/* Loop over the queue entries until they are finished. */ /* Loop over the queue entries until they are finished. */
while (ctq) while (ctq)
{ {
free(prev); free (prev);
prev = ctq; prev = ctq;
if (!au->error.has_error) if (!au->error.has_error)
{ {

View File

@ -269,7 +269,7 @@ free_format_data (format_data *fmt)
fnp->format != FMT_NONE; fnp++) fnp->format != FMT_NONE; fnp++)
if (fnp->format == FMT_DT) 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); free (fnp->u.udf.vlist);
} }

View File

@ -4522,7 +4522,7 @@ st_read_done_worker (st_parameter_dt *dtp, bool unlock)
{ {
free (dtp->u.p.current_unit->filename); free (dtp->u.p.current_unit->filename);
dtp->u.p.current_unit->filename = NULL; 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; dtp->u.p.current_unit->ls = NULL;
} }
free_newunit = true; free_newunit = true;
@ -4618,7 +4618,7 @@ st_write_done_worker (st_parameter_dt *dtp, bool unlock)
{ {
free (dtp->u.p.current_unit->filename); free (dtp->u.p.current_unit->filename);
dtp->u.p.current_unit->filename = NULL; 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; dtp->u.p.current_unit->ls = NULL;
} }
free_newunit = true; free_newunit = true;

View File

@ -1028,7 +1028,7 @@ mem_flush (unix_stream *s __attribute__ ((unused)))
static int static int
mem_close (unix_stream *s) mem_close (unix_stream *s)
{ {
free(s); free (s);
return 0; return 0;
} }