Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/indent indent: use separate variables for lexi_alnum...
details: https://anonhg.NetBSD.org/src/rev/5dac0d3bdb8b
branches: trunk
changeset: 989106:5dac0d3bdb8b
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Oct 11 20:31:06 2021 +0000
description:
indent: use separate variables for lexi_alnum and lexi
These two uses of the variable are independent of each other.
No functional change.
diffstat:
usr.bin/indent/lexi.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 2fc6f8cb7246 -r 5dac0d3bdb8b usr.bin/indent/lexi.c
--- a/usr.bin/indent/lexi.c Mon Oct 11 20:23:25 2021 +0000
+++ b/usr.bin/indent/lexi.c Mon Oct 11 20:31:06 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lexi.c,v 1.90 2021/10/11 20:13:46 rillig Exp $ */
+/* $NetBSD: lexi.c,v 1.91 2021/10/11 20:31:06 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
#if defined(__NetBSD__)
-__RCSID("$NetBSD: lexi.c,v 1.90 2021/10/11 20:13:46 rillig Exp $");
+__RCSID("$NetBSD: lexi.c,v 1.91 2021/10/11 20:31:06 rillig Exp $");
#elif defined(__FreeBSD__)
__FBSDID("$FreeBSD: head/usr.bin/indent/lexi.c 337862 2018-08-15 18:19:45Z pstef $");
#endif
@@ -505,9 +505,9 @@
inbuf_skip();
}
- token_type ttype = lexi_alnum(state);
- if (ttype != end_of_file)
- return lexi_end(ttype);
+ token_type alnum_ttype = lexi_alnum(state);
+ if (alnum_ttype != end_of_file)
+ return lexi_end(alnum_ttype);
/* Scan a non-alphanumeric token */
@@ -515,6 +515,7 @@
*token.e++ = inbuf_next();
*token.e = '\0';
+ token_type ttype;
bool unary_delim = false; /* whether the current token forces a
* following operator to be unary */
Home |
Main Index |
Thread Index |
Old Index