aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-12-05 10:14:28 +0200
committerArnold D. Robbins <arnold@skeeve.com>2021-12-05 10:14:28 +0200
commit1489bafaf7a0107e307932ec7e6fff6a4f7d58df (patch)
tree740f1ead5c8312c885ebbbb7f5834b50e8f869e0
parent0521e672efdbfdaedabfacca03c7a535b4f8526c (diff)
parent7d8a75a766b17fe395c0a82050d314c2dea57f3e (diff)
downloadegawk-1489bafaf7a0107e307932ec7e6fff6a4f7d58df.tar.gz
egawk-1489bafaf7a0107e307932ec7e6fff6a4f7d58df.tar.bz2
egawk-1489bafaf7a0107e307932ec7e6fff6a4f7d58df.zip
Merge branch 'gawk-5.1-stable'
-rw-r--r--ChangeLog5
-rw-r--r--builtin.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 333e026d..6f4907bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-12-02 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * builtin.c (efwrite): Don't use return in call of function
+ returning void. Some compilers might not like it.
+
2021-12-01 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (efflush): Don't use return in call of function
diff --git a/builtin.c b/builtin.c
index 37cc5728..a1f09690 100644
--- a/builtin.c
+++ b/builtin.c
@@ -151,10 +151,14 @@ efwrite(const void *ptr,
{
errno = 0;
if (rp != NULL) {
- if (rp->output.gawk_fwrite(ptr, size, count, fp, rp->output.opaque) != count)
- return wrerror(fp, from, rp);
- } else if (fwrite(ptr, size, count, fp) != count)
- return wrerror(fp, from, rp);
+ if (rp->output.gawk_fwrite(ptr, size, count, fp, rp->output.opaque) != count) {
+ wrerror(fp, from, rp);
+ return;
+ }
+ } else if (fwrite(ptr, size, count, fp) != count) {
+ wrerror(fp, from, rp);
+ return;
+ }
if (flush
&& ((fp == stdout && output_is_tty)
|| (rp != NULL && (rp->flag & RED_NOBUF) != 0)))