[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2428-gf0b9ec
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2428-gf0b9ec9 |
Date: |
Thu, 2 Feb 2017 13:57:46 +0000 (UTC) |
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, master has been updated
via f0b9ec9b838045318bcc8512c48dd93c66d4eef5 (commit)
from c54a8ebdc993aa3bf259fa7ab85a0f077a70040c (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=f0b9ec9b838045318bcc8512c48dd93c66d4eef5
commit f0b9ec9b838045318bcc8512c48dd93c66d4eef5
Author: Arnold D. Robbins <address@hidden>
Date: Thu Feb 2 15:57:30 2017 +0200
Undo change, but update comments as to why not needed.
diff --git a/ChangeLog b/ChangeLog
index f9e1cef..6fe653f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
end for the NUL in case we add a sign. Thanks to Andrew Schorr
for making me look at this code.
+ And later in the same day:
+
+ * awkgram.y (set_profile_next): Undo previous change, since estrdup
+ handles it, but updated the comments.
+
2017-02-01 Arnold D. Robbins <address@hidden>
* builtin.c (mbc_char_count): Remove spurious multiplies by
diff --git a/awkgram.c b/awkgram.c
index fb6e482..a39fff2 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -8712,9 +8712,9 @@ static NODE *
set_profile_text(NODE *n, const char *str, size_t len)
{
if (do_pretty_print) {
- // extra byte in case need to add minus sign in negate_num
- // and another one for the \0 at the end
- n->stptr = estrdup(str, len + 2);
+ // extra byte in case we need to add minus sign in negate_num
+ // note that estrdup adds another byte for the \0 at the end
+ n->stptr = estrdup(str, len + 1);
n->stptr[len] = '\0';
n->stlen = len;
// Set STRCUR and n->stfmt for use when profiling
diff --git a/awkgram.y b/awkgram.y
index a9e8f9a..f506be8 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -6292,9 +6292,9 @@ static NODE *
set_profile_text(NODE *n, const char *str, size_t len)
{
if (do_pretty_print) {
- // extra byte in case need to add minus sign in negate_num
- // and another one for the \0 at the end
- n->stptr = estrdup(str, len + 2);
+ // extra byte in case we need to add minus sign in negate_num
+ // note that estrdup adds another byte for the \0 at the end
+ n->stptr = estrdup(str, len + 1);
n->stptr[len] = '\0';
n->stlen = len;
// Set STRCUR and n->stfmt for use when profiling
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
awkgram.c | 6 +++---
awkgram.y | 6 +++---
3 files changed, 11 insertions(+), 6 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2428-gf0b9ec9,
Arnold Robbins <=