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 process_comment, migrate int varia...
details: https://anonhg.NetBSD.org/src/rev/56f3f6d03742
branches: trunk
changeset: 1024227:56f3f6d03742
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Oct 12 22:22:35 2021 +0000
description:
indent: in process_comment, migrate int variable to bool
No functional change.
diffstat:
usr.bin/indent/pr_comment.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r b05707e3a79c -r 56f3f6d03742 usr.bin/indent/pr_comment.c
--- a/usr.bin/indent/pr_comment.c Tue Oct 12 22:20:22 2021 +0000
+++ b/usr.bin/indent/pr_comment.c Tue Oct 12 22:22:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pr_comment.c,v 1.75 2021/10/12 22:20:22 rillig Exp $ */
+/* $NetBSD: pr_comment.c,v 1.76 2021/10/12 22:22:35 rillig Exp $ */
/*-
* SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
#if defined(__NetBSD__)
-__RCSID("$NetBSD: pr_comment.c,v 1.75 2021/10/12 22:20:22 rillig Exp $");
+__RCSID("$NetBSD: pr_comment.c,v 1.76 2021/10/12 22:22:35 rillig Exp $");
#elif defined(__FreeBSD__)
__FBSDID("$FreeBSD: head/usr.bin/indent/pr_comment.c 334927 2018-06-10 16:44:18Z pstef $");
#endif
@@ -264,11 +264,12 @@
}
++line_no;
if (may_wrap) {
- int asterisks_to_skip = 1;
+ bool skip_asterisk = true;
do { /* flush any blanks and/or tabs at start of
* next line */
inbuf_skip();
- if (*inp.s == '*' && --asterisks_to_skip >= 0) {
+ if (*inp.s == '*' && skip_asterisk) {
+ skip_asterisk = false;
inbuf_skip();
if (*inp.s == '/')
goto end_of_comment;
Home |
Main Index |
Thread Index |
Old Index