[hackers] [ubase][PATCH 2/3] stty: fix casting bug

From: Mattias Andrée <maandree_AT_kth.se>
Date: Wed, 30 Mar 2016 16:46:08 +0200

Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
---
 stty.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/stty.c b/stty.c
index 3e90b8f..9f4307b 100644
--- a/stty.c
+++ b/stty.c
_AT_@ -629,11 +629,11 @@ displaysettings(struct termios *m, int all)
 	printtoken("\n");
 
 	if (all || m->c_line != 0)
-		printtoken("line = %u;", (unsigned long)(m->c_line));
+		printtoken("line = %u;", (unsigned)(m->c_line));
 	if (all || (m->c_cc[VMIN] != 1 && !(m->c_lflag & ICANON)))
-		printtoken("min = %u;", (unsigned long)(m->c_cc[VMIN]));
+		printtoken("min = %u;", (unsigned)(m->c_cc[VMIN]));
 	if (all || (m->c_cc[VTIME] != 0 && !(m->c_lflag & ICANON)))
-		printtoken("time = %u;", (unsigned long)(m->c_cc[VTIME]));
+		printtoken("time = %u;", (unsigned)(m->c_cc[VTIME]));
 	printtoken("\n");
 
 	for (; kbd->op; kbd++)
-- 
2.7.4
Received on Wed Mar 30 2016 - 16:46:08 CEST

This archive was generated by hypermail 2.3.0 : Wed Mar 30 2016 - 16:48:20 CEST