[U-Boot] [PATCH 1/1] video: cfb_console: simplify logical constraint

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Mar 18 13:24:39 UTC 2018


(A || !A && B) == (A || B)

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 drivers/video/cfb_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 0b25897062..5b7795dd44 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -768,7 +768,7 @@ static void parse_putc(const char c)
 		break;
 
 	case '\n':		/* next line */
-		if (console_col || (!console_col && nl))
+		if (console_col || nl)
 			console_newline(1);
 		nl = 1;
 		break;
-- 
2.16.2



More information about the U-Boot mailing list