klibc-bot for Herbert Xu
2019-Jan-25 03:15 UTC
[klibc] [klibc:update-dash] [BUILTIN] Remove unnecessary restoration of format string in printf
Commit-ID: c0a8ac18981f20b315b43a5a3f8fbe64e1cbc749 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=c0a8ac18981f20b315b43a5a3f8fbe64e1cbc749 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Mon, 27 Oct 2014 15:53:48 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] [BUILTIN] Remove unnecessary restoration of format string in printf Currently we try to preserve the format string which is stored in argv after temporarily modifying it. This is unnecessary as it's only ever used once. This patch gets rid of it. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/bltin/printf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index d49d4454..5cd34a19 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -209,7 +209,6 @@ pc: if (print_escape_str(start, param, array, getstr())) goto out; - *fmt = 'b'; break; case 'c': { int p = getchr();
Reasonably Related Threads
- [klibc:update-dash] dash: [BUILTIN] Remove unnecessary restoration of format string in printf
- [klibc:update-dash] dash: Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"
- [klibc:update-dash] Revert "[BUILTIN] Remove unnecessary restoration of format string in printf"
- [klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
- [klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf