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: remove redundant conditions



details:   https://anonhg.NetBSD.org/src/rev/6a9897bd381c
branches:  trunk
changeset: 988669:6a9897bd381c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Oct 08 22:22:14 2021 +0000

description:
indent: remove redundant conditions

No functional change.

diffstat:

 usr.bin/indent/pr_comment.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r f5683c4da823 -r 6a9897bd381c usr.bin/indent/pr_comment.c
--- a/usr.bin/indent/pr_comment.c       Fri Oct 08 22:17:35 2021 +0000
+++ b/usr.bin/indent/pr_comment.c       Fri Oct 08 22:22:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pr_comment.c,v 1.65 2021/10/08 22:17:35 rillig Exp $   */
+/*     $NetBSD: pr_comment.c,v 1.66 2021/10/08 22:22:14 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.65 2021/10/08 22:17:35 rillig Exp $");
+__RCSID("$NetBSD: pr_comment.c,v 1.66 2021/10/08 22:22:14 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/pr_comment.c 334927 2018-06-10 16:44:18Z pstef $");
 #endif
@@ -210,7 +210,7 @@
                ps.use_ff = true;
                dump_line();
                last_blank = -1;
-               if (!box_com && opt.star_comment_cont)
+               if (opt.star_comment_cont)
                    *com.e++ = ' ', *com.e++ = '*', *com.e++ = ' ';
                inp.s++;
                while (is_hspace(*inp.s))
@@ -320,7 +320,7 @@
                /* the comment is too long, it must be broken up */
                if (last_blank == -1) {
                    dump_line();
-                   if (!box_com && opt.star_comment_cont)
+                   if (opt.star_comment_cont)
                        *com.e++ = ' ', *com.e++ = '*', *com.e++ = ' ';
                    break;
                }
@@ -329,7 +329,7 @@
                com.e = com.buf + last_blank;
                dump_line();
 
-               if (!box_com && opt.star_comment_cont)
+               if (opt.star_comment_cont)
                    *com.e++ = ' ', *com.e++ = '*', *com.e++ = ' ';
 
                const char *p = com.buf + last_blank + 1;



Home | Main Index | Thread Index | Old Index