From cedd0829b0075533986fce1e699bc6ae511a891e Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Mon, 4 Jul 2016 11:20:07 -0400 Subject: Unify force_string handling of CONVFMT and OFMT. --- builtin.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index 92ac9e49..a01018e3 100644 --- a/builtin.c +++ b/builtin.c @@ -2200,12 +2200,7 @@ do_print(int nargs, int redirtype) DEREF(args_array[i]); fatal(_("attempt to use array `%s' in a scalar context"), array_vname(tmp)); } - - if (tmp->type == Node_typedregex) - args_array[i] = force_string(tmp); - else if (!((tmp->flags & STRCUR) != 0 - && (tmp->stfmt == STFMT_UNUSED || tmp->stfmt == OFMTidx))) - args_array[i] = format_val(OFMT, OFMTidx, tmp); + args_array[i] = force_string_ofmt(tmp); } if (redir_exp != NULL) { -- cgit v1.2.3