From 788654dd82ec204ccdcb84cc20c7595d20a5e5a1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 4 Mar 2023 11:42:16 -0800 Subject: split: style fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/split.c (ofile_open): Avoid ‘if (! (a = b))’ style. --- src/split.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/split.c b/src/split.c index b0a7c70ff..8550ef442 100644 --- a/src/split.c +++ b/src/split.c @@ -1111,8 +1111,10 @@ ofile_open (of_t *files, idx_t i_check, idx_t nfiles) } files[i_check].ofd = fd; - if (!(files[i_check].ofile = fdopen (fd, "a"))) + FILE *ofile = fdopen (fd, "a"); + if (!ofile) die (EXIT_FAILURE, errno, "%s", quotef (files[i_check].of_name)); + files[i_check].ofile = ofile; files[i_check].opid = filter_pid; filter_pid = 0; } -- cgit v1.2.1