[PATCH 16/31] more: remove unnecessary braces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 text-utils/more.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/text-utils/more.c b/text-utils/more.c
index 2813ce7..bf3ab9c 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -547,15 +547,12 @@ static int get_line(struct more_control *ctl, FILE *f, int *length)
 #endif
 		c = more_getc(ctl, f);
 	}
-	if (column >= ctl->Mcol && ctl->Mcol > 0) {
-		if (!ctl->Wrap) {
+	if (column >= ctl->Mcol && ctl->Mcol > 0)
+		if (!ctl->Wrap)
 			*p++ = '\n';
-		}
-	}
 	colflg = column == ctl->Mcol && ctl->fold_opt;
-	if (colflg && ctl->eatnl && ctl->Wrap) {
+	if (colflg && ctl->eatnl && ctl->Wrap)
 		*p++ = '\n';	/* simulate normal wrap */
-	}
 	*length = p - ctl->Line;
 	*p = 0;
 	return column;
@@ -567,9 +564,9 @@ static void erasep(struct more_control *ctl, int col)
 
 	if (ctl->promptlen == 0)
 		return;
-	if (ctl->hard) {
+	if (ctl->hard)
 		putchar('\n');
-	} else {
+	else {
 		if (col == 0)
 			putchar('\r');
 		if (!ctl->dumb && ctl->eraseln)
@@ -678,9 +675,9 @@ static void prompt(struct more_control *ctl, char *filename)
 		if (ctl->clreol)
 			my_putstring(ctl->eraseln);
 		ctl->promptlen += printf(_("--More--"));
-		if (filename != NULL) {
+		if (filename != NULL)
 			ctl->promptlen += printf(_("(Next file: %s)"), filename);
-		} else if (!ctl->no_intty) {
+		else if (!ctl->no_intty) {
 			ctl->promptlen +=
 			    printf("(%d%%)",
 				   (int)((ctl->file_pos * 100) / ctl->file_size));
@@ -846,9 +843,9 @@ static void ttyin(struct more_control *ctl, char buf[], int nmax, char pchar)
 		if (ctl->promptlen > maxlen)
 			maxlen = ctl->promptlen;
 		c = readch(ctl);
-		if (c == '\\') {
+		if (c == '\\')
 			slash++;
-		} else if (((cc_t) c == ctl->otty.c_cc[VERASE]) && !slash) {
+		else if (((cc_t) c == ctl->otty.c_cc[VERASE]) && !slash) {
 			if (sp > buf) {
 #ifdef HAVE_WIDECHAR
 				if (MB_CUR_MAX > 1) {
-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux