Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Set the line number before expanding args, not after....
details: https://anonhg.NetBSD.org/src/rev/4c9b71215f0b
branches: trunk
changeset: 824503:4c9b71215f0b
user: kre <kre%NetBSD.org@localhost>
date: Wed Jun 07 08:07:50 2017 +0000
description:
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.
diffstat:
bin/sh/expand.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 51a8c2fe8de7 -r 4c9b71215f0b bin/sh/expand.c
--- a/bin/sh/expand.c Wed Jun 07 08:06:22 2017 +0000
+++ b/bin/sh/expand.c Wed Jun 07 08:07:50 2017 +0000
@@ -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 @@
STARTSTACKSTR(expdest);
ifsfirst.next = NULL;
ifslastp = NULL;
+ line_number = arg->narg.lineno;
argstr(arg->narg.text, flag);
- line_number = arg->narg.lineno;
if (arglist == NULL) {
STACKSTRNUL(expdest);
CTRACE(DBG_EXPAND, ("expandarg: no arglist, done (%d) \"%s\"\n",
Home |
Main Index |
Thread Index |
Old Index