diff options
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/async.c | 6 | ||||
-rw-r--r-- | libgfortran/io/format.c | 3 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 6 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 3 |
4 files changed, 6 insertions, 12 deletions
diff --git a/libgfortran/io/async.c b/libgfortran/io/async.c index 81d1d81..01adf8f 100644 --- a/libgfortran/io/async.c +++ b/libgfortran/io/async.c @@ -71,8 +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; - if (temp) - free (temp); + free(temp); } /* Destroy an adv_cond structure. */ @@ -106,8 +105,7 @@ async_io (void *arg) /* Loop over the queue entries until they are finished. */ while (ctq) { - if (prev) - free (prev); + free(prev); prev = ctq; if (!au->error.has_error) { diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 9e06902..66acbf0 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -269,8 +269,7 @@ free_format_data (format_data *fmt) fnp->format != FMT_NONE; fnp++) if (fnp->format == FMT_DT) { - if (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist)) - free (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist)); + free(GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist)); free (fnp->u.udf.vlist); } diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 8bb5d11..19b0b9a9 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -4522,8 +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; - if (dtp->u.p.current_unit->ls) - free (dtp->u.p.current_unit->ls); + free(dtp->u.p.current_unit->ls); dtp->u.p.current_unit->ls = NULL; } free_newunit = true; @@ -4619,8 +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; - if (dtp->u.p.current_unit->ls) - free (dtp->u.p.current_unit->ls); + free(dtp->u.p.current_unit->ls); dtp->u.p.current_unit->ls = NULL; } free_newunit = true; diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index ba12be0..ef35b85 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1028,8 +1028,7 @@ mem_flush (unix_stream *s __attribute__ ((unused))) static int mem_close (unix_stream *s) { - if (s) - free (s); + free(s); return 0; } |