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 <[email protected]>
---

 ChangeLog          |    1 +
 src/bltin/printf.c |    1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 47ba519..026b47c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * Replace open-coded flushall in preadbuffer.
        * Add likely tag in outmem.
        * Add ifdefs around MEM_OUT handling in outmem.
+       * Remove unnecessary restoration of format string in printf.
 
 2014-10-13  Eric Blake <[email protected]>
 
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();
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to