aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-10-25 21:44:18 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-10-25 21:44:18 +0200
commit1bba94521445126120cecd41f7ea29a2810a5eeb (patch)
tree79b5bdd3a3831ca2aa51edf1b4408dc5d9f87206 /io.c
parent29658e8b38047b234d682613592253761df63d24 (diff)
parent118622c2a66b302ec9706ccd3296a6cc2b8bfb13 (diff)
downloadegawk-1bba94521445126120cecd41f7ea29a2810a5eeb.tar.gz
egawk-1bba94521445126120cecd41f7ea29a2810a5eeb.tar.bz2
egawk-1bba94521445126120cecd41f7ea29a2810a5eeb.zip
Merge branch 'gawk_performance'
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/io.c b/io.c
index e423a436..4b7976f1 100644
--- a/io.c
+++ b/io.c
@@ -211,7 +211,7 @@ static int inetfile(const char *str, int *length, int *family);
#endif
static struct redirect *red_head = NULL;
-static NODE *RS;
+static NODE *RS = NULL;
static Regexp *RS_re_yes_case;
static Regexp *RS_re_no_case;
static Regexp *RS_regexp;
@@ -611,7 +611,7 @@ redirect(NODE *redir_exp, int redirtype, int *errflg)
if (do_lint && (redir_exp->flags & STRCUR) == 0)
lintwarn(_("expression in `%s' redirection only has numeric value"),
what);
- redir_exp = force_string(redir_exp);
+ redir_exp= force_string(redir_exp);
str = redir_exp->stptr;
if (str == NULL || *str == '\0')
@@ -2531,7 +2531,7 @@ iop_alloc(int fd, const char *name, IOBUF *iop, int do_openhooks)
#define set_RT_to_null() \
(void)(! do_traditional && (unref(RT_node->var_value), \
- RT_node->var_value = Nnull_string))
+ RT_node->var_value = dupnode(Nnull_string)))
#define set_RT(str, len) \
(void)(! do_traditional && (unref(RT_node->var_value), \
@@ -3147,8 +3147,7 @@ pty_vs_pipe(const char *command)
#ifdef HAVE_TERMIOS_H
char *full_index;
size_t full_len;
- NODE *val;
- NODE *sub;
+ NODE *val, *sub;
if (PROCINFO_node == NULL)
return FALSE;