[PATCH 06/13] col: coding style changes

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

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 text-utils/col.c |   24 +++++++++++-------------
 1 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/text-utils/col.c b/text-utils/col.c
index 4164800..0740687 100644
--- a/text-utils/col.c
+++ b/text-utils/col.c
@@ -219,10 +219,10 @@ int main(int argc, char **argv)
 	cur_set = last_set = CS_NORMAL;
 	lines = l = alloc_line();
 
-	while (feof(stdin)==0) {
+	while (feof(stdin) == 0) {
 		errno = 0;
 		if ((ch = getwchar()) == WEOF) {
-			if (errno==EILSEQ) {
+			if (errno == EILSEQ) {
 				warn(NULL);
 				ret = EXIT_FAILURE;
 			}
@@ -401,7 +401,7 @@ void flush_lines(int nflush)
 		}
 		nblank_lines++;
 		if (l->l_line)
-			(void)free((void *)l->l_line);
+			free((void *)l->l_line);
 		free_line(l);
 	}
 	if (lines)
@@ -508,11 +508,11 @@ void flush_line(LINE *l)
 				int ntabs;
 
 				ntabs = this_col / 8 - last_col / 8;
-                                if (ntabs > 0) {
-                                        nspace = this_col & 7;
-                                        while (--ntabs >= 0)
-                                                PUTC('\t');
-                                }
+				if (ntabs > 0) {
+					nspace = this_col & 7;
+					while (--ntabs >= 0)
+						PUTC('\t');
+				}
 			}
 			while (--nspace >= 0)
 				PUTC(' ');
@@ -531,7 +531,7 @@ void flush_line(LINE *l)
 				last_set = c->c_set;
 			}
 			PUTC(c->c_char);
-			if ((c+1) < endc) {
+			if ((c + 1) < endc) {
 				int i;
 				for (i=0; i < c->c_width; i++)
 					PUTC('\b');
@@ -539,7 +539,7 @@ void flush_line(LINE *l)
 			if (++c >= endc)
 				break;
 		}
-		last_col += (c-1)->c_width;
+		last_col += (c - 1)->c_width;
 	}
 }
 
@@ -564,7 +564,7 @@ alloc_line()
 	line_freelist = l->l_next;
 
 	memset(l, 0, sizeof(LINE));
-	return(l);
+	return l;
 }
 
 void free_line(LINE *l)
@@ -572,5 +572,3 @@ void free_line(LINE *l)
 	l->l_next = line_freelist;
 	line_freelist = l;
 }
-
-
-- 
1.7.5.2

--
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