From f0cb62063a1f090369542e67478b6796f7c0f0d9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 24 Oct 2019 21:32:39 +0200 Subject: [PATCH] core: open_output_file: Prepare for M2-Planet. * src/posix.c (open_output_file): Prepare for M2-Planet. --- src/posix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/posix.c b/src/posix.c index a4413edc..21f8f59d 100644 --- a/src/posix.c +++ b/src/posix.c @@ -251,8 +251,9 @@ open_output_file (SCM x) /*:((arity . n)) */ SCM file_name = car (x); x = cdr (x); int mode = S_IRUSR | S_IWUSR; - if (TYPE (x) == TPAIR && TYPE (car (x)) == TNUMBER) - mode = VALUE (car (x)); + if (TYPE (x) == TPAIR) + if (TYPE (car (x)) == TNUMBER) + mode = VALUE (car (x)); return make_number (mes_open (cell_bytes (STRING (file_name)), O_WRONLY | O_CREAT | O_TRUNC, mode)); }