[PATCH 03/10] readline: remove unused variable

Sascha Hauer s.hauer at pengutronix.de
Tue Nov 12 08:52:12 EST 2013


'rc' is never set to anything else than 0, so drop it.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 lib/readline.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/readline.c b/lib/readline.c
index 3fb620e..6afc491 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -191,7 +191,6 @@ int readline(const char *prompt, char *buf, int len)
 	unsigned wlen;
 	int ichar;
 	int insert = 1;
-	int rc = 0;
 #ifdef CONFIG_AUTO_COMPLETE
 	char tmp;
 	int reprint, i;
@@ -351,5 +350,5 @@ int readline(const char *prompt, char *buf, int len)
 		cread_add_to_hist(buf);
 	hist_cur = hist_add_idx;
 
-	return rc < 0 ? rc : len;
+	return len;
 }
-- 
1.8.4.2




More information about the barebox mailing list