aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-04-01 16:04:03 +0300
committerArnold D. Robbins <arnold@skeeve.com>2022-04-01 16:04:03 +0300
commit12bff814007d0cde8d0b08eaaf0bcfd385c668ac (patch)
tree9d62cfb9537b18488f81b5ffae15f393a81b2bc0 /profile.c
parent7419129f87d8c2efaca2a19e1322df431bc9bcbc (diff)
downloadegawk-12bff814007d0cde8d0b08eaaf0bcfd385c668ac.tar.gz
egawk-12bff814007d0cde8d0b08eaaf0bcfd385c668ac.tar.bz2
egawk-12bff814007d0cde8d0b08eaaf0bcfd385c668ac.zip
Small fixes from the persistent-gawk team.
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/profile.c b/profile.c
index 62e39e93..15b33721 100644
--- a/profile.c
+++ b/profile.c
@@ -668,7 +668,7 @@ cleanup:
case Op_K_print_rec:
if (pc->opcode == Op_K_print_rec)
// instead of `print $0', just `print'
- tmp = strdup("");
+ tmp = estrdup("", 0);
else if (pc->redir_type != 0) {
// Avoid turning printf("hello\n") into printf(("hello\n"))
NODE *n = pp_top();
@@ -678,7 +678,7 @@ cleanup:
&& n->pp_str[n->pp_len - 1] == ')') {
n = pp_pop();
- tmp = strdup(n->pp_str);
+ tmp = estrdup(n->pp_str, strlen(n->pp_str));
pp_free(n);
} else
tmp = pp_list(pc->expr_count, "()", ", ");