From f0866c5197ee0c01fd1ded16e364cbe612c271be Mon Sep 17 00:00:00 2001 From: john haque Date: Sun, 21 Aug 2011 05:54:38 -0500 Subject: Add a test file, cleanup code and update doc. --- builtin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index f5aa503d..bf688581 100644 --- a/builtin.c +++ b/builtin.c @@ -1348,7 +1348,7 @@ out2: _("too many arguments supplied for format string")); } bchunk(s0, s1 - s0); - r = make_str_node(obuf, obufout - obuf); + r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED); obuf = NULL; out: { @@ -1612,7 +1612,7 @@ do_substr(int nargs) wp++; } *cp = '\0'; - r = make_str_node(substr, cp - substr); + r = make_str_node(substr, cp - substr, ALREADY_MALLOCED); } #else r = make_string(t1->stptr + indx, length); @@ -2724,7 +2724,7 @@ done: if (matches > 0) { /* return the result string */ DEREF(t); - return make_str_node(buf, textlen); + return make_str_node(buf, textlen, ALREADY_MALLOCED); } /* return the original string */ @@ -2736,7 +2736,7 @@ done: DEREF(t); else if (matches > 0) { unref(*lhs); - *lhs = make_str_node(buf, textlen); + *lhs = make_str_node(buf, textlen, ALREADY_MALLOCED); } return make_number((AWKNUM) matches); -- cgit v1.2.3