diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-03-04 11:42:16 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-03-04 14:49:46 -0800 |
commit | 788654dd82ec204ccdcb84cc20c7595d20a5e5a1 (patch) | |
tree | 1dced04f37947e2d95366d25c4b95d7ef66dee5b | |
parent | 40bf1591bb4362fa91e501bcec7c2029c5f65a43 (diff) | |
download | coreutils-788654dd82ec204ccdcb84cc20c7595d20a5e5a1.tar.gz |
split: style fix
* src/split.c (ofile_open): Avoid ‘if (! (a = b))’ style.
-rw-r--r-- | src/split.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |