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: in dump_line, reduce scope of local v...
details: https://anonhg.NetBSD.org/src/rev/ff3ae782fb65
branches: trunk
changeset: 1019526:ff3ae782fb65
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Mar 13 13:54:01 2021 +0000
description:
indent: in dump_line, reduce scope of local variable
This allows the variable 'target' in the lower half of the function to
get a more specific name.
No functional change.
diffstat:
usr.bin/indent/io.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 4f46521371d6 -r ff3ae782fb65 usr.bin/indent/io.c
--- a/usr.bin/indent/io.c Sat Mar 13 13:51:08 2021 +0000
+++ b/usr.bin/indent/io.c Sat Mar 13 13:54:01 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.43 2021/03/13 13:51:08 rillig Exp $ */
+/* $NetBSD: io.c,v 1.44 2021/03/13 13:54:01 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@
#include <sys/cdefs.h>
#ifndef lint
#if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.43 2021/03/13 13:51:08 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.44 2021/03/13 13:54:01 rillig Exp $");
#elif defined(__FreeBSD__)
__FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
#endif
@@ -115,7 +115,7 @@
void
dump_line(void)
{
- int cur_col, target_col;
+ int cur_col;
static int not_first_line;
if (ps.procname[0]) {
@@ -195,7 +195,7 @@
comment_open = 0;
output_string(".*/\n");
}
- target_col = 1 + compute_code_indent();
+ int target_col = 1 + compute_code_indent();
{
int i;
Home |
Main Index |
Thread Index |
Old Index