Module Name:    src
Committed By:   rillig
Date:           Fri Oct  8 22:22:14 UTC 2021

Modified Files:
        src/usr.bin/indent: pr_comment.c

Log Message:
indent: remove redundant conditions

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/indent/pr_comment.c
diff -u src/usr.bin/indent/pr_comment.c:1.65 src/usr.bin/indent/pr_comment.c:1.66
--- src/usr.bin/indent/pr_comment.c:1.65	Fri Oct  8 22:17:35 2021
+++ src/usr.bin/indent/pr_comment.c	Fri Oct  8 22:22:14 2021
@@ -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 @@ static char sccsid[] = "@(#)pr_comment.c
 
 #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 @@ process_comment(void)
 		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 @@ process_comment(void)
 		/* 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 @@ process_comment(void)
 		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;

Reply via email to