Module Name: src
Committed By: kre
Date: Wed Jun 7 08:07:51 UTC 2017
Modified Files:
src/bin/sh: expand.c
Log Message:
Set the line number before expanding args, not after. As the line_number
would have usually been set earlier, this change is mostly an effective
no-op, but it is better this way (just in case) - not observed to have
caused any problems.
To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/bin/sh/expand.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.113 src/bin/sh/expand.c:1.114
--- src/bin/sh/expand.c:1.113 Wed Jun 7 05:08:32 2017
+++ src/bin/sh/expand.c Wed Jun 7 08:07:50 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: expand.c,v 1.113 2017/06/07 05:08:32 kre Exp $ */
+/* $NetBSD: expand.c,v 1.114 2017/06/07 08:07:50 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
#else
-__RCSID("$NetBSD: expand.c,v 1.113 2017/06/07 05:08:32 kre Exp $");
+__RCSID("$NetBSD: expand.c,v 1.114 2017/06/07 08:07:50 kre Exp $");
#endif
#endif /* not lint */
@@ -168,8 +168,8 @@ expandarg(union node *arg, struct arglis
STARTSTACKSTR(expdest);
ifsfirst.next = NULL;
ifslastp = NULL;
- argstr(arg->narg.text, flag);
line_number = arg->narg.lineno;
+ argstr(arg->narg.text, flag);
if (arglist == NULL) {
STACKSTRNUL(expdest);
CTRACE(DBG_EXPAND, ("expandarg: no arglist, done (%d) \"%s\"\n",