[klibc] [klibc:master] [BUILTIN] Eliminate unnecessary promotion in echocmd

klibc-bot for Herbert Xu herbert at gondor.hengli.com.au
Mon Jul 2 02:12:05 PDT 2012


Commit-ID:  6f235a75b71121b368976b2d931472cc918e9499
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=6f235a75b71121b368976b2d931472cc918e9499
Author:     Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Thu, 7 Jul 2011 15:22:03 +0800
Committer:  maximilian attems <max at stro.at>
CommitDate: Mon, 2 Jul 2012 10:44:00 +0200

[klibc] [BUILTIN] Eliminate unnecessary promotion in echocmd

The patch to make outc into an inline function created an unnecessary
promotion in echocmd due to its use of char vs. the int used by outc.
This patch changes echocmd to use int instead.

Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: maximilian attems <max at stro.at>

---
 usr/dash/bltin/printf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c
index 8efcbe3..b32b54f 100644
--- a/usr/dash/bltin/printf.c
+++ b/usr/dash/bltin/printf.c
@@ -449,7 +449,7 @@ echocmd(int argc, char **argv)
 	}
 
 	do {
-		char c;
+		int c;
 
 		nonl += conv_escape_str(*argv);
 		outstr(stackblock(), outs);


More information about the klibc mailing list