summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2014-10-27 15:53:48 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2014-10-27 15:53:48 +0800
commit7bb413255368e94395237d789f522891093c5774 (patch)
tree2d13bc391beab47e669c799a3af067915f42f619 /src
parent[OUTPUT] Add ifdefs around MEM_OUT handling in outmem (diff)
downloaddash-7bb413255368e94395237d789f522891093c5774.tar.gz
dash-7bb413255368e94395237d789f522891093c5774.zip
[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@gondor.apana.org.au>
Diffstat (limited to 'src')
-rw-r--r--src/bltin/printf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/bltin/printf.c b/src/bltin/printf.c
index 213025f..d1181e3 100644
--- a/src/bltin/printf.c
+++ b/src/bltin/printf.c
@@ -207,7 +207,6 @@ pc:
 				if (print_escape_str(start, param, array,
 						     getstr()))
 					goto out;
-				*fmt = 'b';
 				break;
 			case 'c': {
 				int p = getchr();