summaryrefslogtreecommitdiff
path: root/libf2c/libI77/close.c
diff options
context:
space:
mode:
Diffstat (limited to 'libf2c/libI77/close.c')
-rw-r--r--libf2c/libI77/close.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libf2c/libI77/close.c b/libf2c/libI77/close.c
index 5c3af4c0854..bbc5bacb821 100644
--- a/libf2c/libI77/close.c
+++ b/libf2c/libI77/close.c
@@ -33,11 +33,10 @@ integer f_clos(cllist *a)
b= &f__units[a->cunit];
if(b->ufd==NULL)
goto done;
+ if (b->uscrtch == 1)
+ goto Delete;
if (!a->csta)
- if (b->uscrtch == 1)
- goto Delete;
- else
- goto Keep;
+ goto Keep;
switch(*a->csta) {
default:
Keep:
@@ -53,8 +52,8 @@ integer f_clos(cllist *a)
case 'd':
case 'D':
Delete:
+ fclose(b->ufd);
if(b->ufnm) {
- fclose(b->ufd);
unlink(b->ufnm); /*SYSDEP*/
free(b->ufnm);
}