aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-07-26 06:05:42 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-07-26 06:05:42 +0300
commit452f4efefd5511bc7dbe95b0167b10b403cdcf45 (patch)
treea0c957508537e36bb1449485d2d0881061750174 /builtin.c
parentfc02808c31a55f1559143ad9d8ad50e2f71a512b (diff)
downloadegawk-452f4efefd5511bc7dbe95b0167b10b403cdcf45.tar.gz
egawk-452f4efefd5511bc7dbe95b0167b10b403cdcf45.tar.bz2
egawk-452f4efefd5511bc7dbe95b0167b10b403cdcf45.zip
Fix gsub and getline pass by reference. Add tests.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index 5b75979c..8685d290 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2412,7 +2412,7 @@ do_match(int nargs)
*/
NODE *
-do_sub(int nargs, unsigned int flags, int *num_matches)
+do_sub(int nargs, unsigned int flags)
{
char *scan;
char *bp, *cp;
@@ -2680,7 +2680,6 @@ set_how_many:
done:
DEREF(s);
- *num_matches = matches;
if ((matches == 0 || (flags & LITERAL) != 0) && buf != NULL)
efree(buf);