Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh NFC: Code style only. Rather than being perverse an...
details: https://anonhg.NetBSD.org/src/rev/10dc9a796ea3
branches: trunk
changeset: 354091:10dc9a796ea3
user: kre <kre%NetBSD.org@localhost>
date: Sat Jun 03 20:55:53 2017 +0000
description:
NFC: Code style only. Rather than being perverse and adding the
negative of a negative number, just add a positive number instead...
(the previous version came about purely as an accident of the way the
relevant piece of code was added and debugged.... that's my story anyway!)
diffstat:
bin/sh/expand.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r 2eaf635e4b7c -r 10dc9a796ea3 bin/sh/expand.c
--- a/bin/sh/expand.c Sat Jun 03 19:41:14 2017 +0000
+++ b/bin/sh/expand.c Sat Jun 03 20:55:53 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: expand.c,v 1.108 2017/06/03 18:37:37 kre Exp $ */
+/* $NetBSD: expand.c,v 1.109 2017/06/03 20:55:53 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.108 2017/06/03 18:37:37 kre Exp $");
+__RCSID("$NetBSD: expand.c,v 1.109 2017/06/03 20:55:53 kre Exp $");
#endif
#endif /* not lint */
@@ -482,10 +482,10 @@
if (quoted == 0) /* allow weird splitting */
recordregion(begoff, begoff + q - 1 - start, 0);
- adjustment = expdest - q + 1;
- STADJUST(-adjustment, expdest);
+ adjustment = q - expdest - 1;
+ STADJUST(adjustment, expdest);
VTRACE(DBG_EXPAND, ("expari: adding %d ed \"%.*s\", "
- "expdest \"%s\" returning \"%.5s...\"\n", -adjustment, expdest-ed,
+ "expdest \"%s\" returning \"%.5s...\"\n", adjustment, expdest - ed,
ed, expdest, p));
return p;
Home |
Main Index |
Thread Index |
Old Index