diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2021-12-05 10:14:28 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2021-12-05 10:14:28 +0200 |
commit | 1489bafaf7a0107e307932ec7e6fff6a4f7d58df (patch) | |
tree | 740f1ead5c8312c885ebbbb7f5834b50e8f869e0 /builtin.c | |
parent | 0521e672efdbfdaedabfacca03c7a535b4f8526c (diff) | |
parent | 7d8a75a766b17fe395c0a82050d314c2dea57f3e (diff) | |
download | gawk-1489bafaf7a0107e307932ec7e6fff6a4f7d58df.tar.gz |
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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))) |