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: always keep next_blank_lines >= 0
details: https://anonhg.NetBSD.org/src/rev/878b18887fba
branches: trunk
changeset: 989908:878b18887fba
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Oct 19 21:39:19 2021 +0000
description:
indent: always keep next_blank_lines >= 0
No functional change.
diffstat:
usr.bin/indent/io.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 139696482bf6 -r 878b18887fba usr.bin/indent/io.c
--- a/usr.bin/indent/io.c Tue Oct 19 21:22:20 2021 +0000
+++ b/usr.bin/indent/io.c Tue Oct 19 21:39:19 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.96 2021/10/19 21:21:07 rillig Exp $ */
+/* $NetBSD: io.c,v 1.97 2021/10/19 21:39:19 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
#if defined(__NetBSD__)
-__RCSID("$NetBSD: io.c,v 1.96 2021/10/19 21:21:07 rillig Exp $");
+__RCSID("$NetBSD: io.c,v 1.97 2021/10/19 21:39:19 rillig Exp $");
#elif defined(__FreeBSD__)
__FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $");
#endif
@@ -235,9 +235,8 @@
}
}
- while (--next_blank_lines >= 0)
+ for (; next_blank_lines > 0; next_blank_lines--)
output_char('\n');
- next_blank_lines = 0;
if (ps.ind_level == 0)
ps.ind_stmt = false; /* this is a class A kludge. don't do
Home |
Main Index |
Thread Index |
Old Index