[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-282
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-2824-g750e316 |
Date: |
Sat, 28 Oct 2017 16:22:37 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.2-stable has been updated
via 750e3168705de678474fea0a551f9cf29e9e077d (commit)
from 92e8b028d2d33884ea5ea50fc879cbca60c9f5f2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=750e3168705de678474fea0a551f9cf29e9e077d
commit 750e3168705de678474fea0a551f9cf29e9e077d
Author: Arnold D. Robbins <address@hidden>
Date: Sat Oct 28 23:22:15 2017 +0300
Small improvements in extension/rwarray.c.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 4bfd896..c04e9c2 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-28 Arnold D. Robbins <address@hidden>
+
+ * rwarray.c (do_writea): Fix description in comment.
+ (write_array): Free the flattened array if writing an element fails.
+
2017-10-19 Arnold D. Robbins <address@hidden>
* 4.2.0: Release tar ball made.
diff --git a/extension/rwarray.c b/extension/rwarray.c
index 2e82ca7..997b6b2 100644
--- a/extension/rwarray.c
+++ b/extension/rwarray.c
@@ -114,7 +114,7 @@ do_writea(int nargs, awk_value_t *result, struct
awk_ext_func *unused)
if (nargs < 2)
goto out;
- /* directory is first arg, array to dump is second */
+ /* filename is first arg, array to dump is second */
if (! get_argument(0, AWK_STRING, & filename)) {
fprintf(stderr, _("do_writea: argument 0 is not a string\n"));
errno = EINVAL;
@@ -178,8 +178,10 @@ write_array(FILE *fp, awk_array_t array)
return awk_false;
for (i = 0; i < flat_array->count; i++) {
- if (! write_elem(fp, & flat_array->elements[i]))
+ if (! write_elem(fp, & flat_array->elements[i])) {
+ (void) release_flattened_array(array, flat_array);
return awk_false;
+ }
}
if (! release_flattened_array(array, flat_array)) {
-----------------------------------------------------------------------
Summary of changes:
extension/ChangeLog | 5 +++++
extension/rwarray.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-2824-g750e316,
Arnold Robbins <=