diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-11-04 16:03:46 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-12-07 01:17:19 +0100 |
commit | 774ce72026f74ac9641bcbbc588b20f2e13f7ab8 (patch) | |
tree | c97f6981bb3a2c7a9acb0d26e2f4f0688bb2a747 | |
parent | b03150b52e3c491a86a3cc0945274f0e8f9872e7 (diff) | |
download | u-boot-774ce72026f74ac9641bcbbc588b20f2e13f7ab8.tar.gz u-boot-774ce72026f74ac9641bcbbc588b20f2e13f7ab8.tar.bz2 u-boot-774ce72026f74ac9641bcbbc588b20f2e13f7ab8.zip |
strings: use puts() rather than printf()
When running `strings` on really long strings, the stack tends to get
smashed due to printf(). Switch to puts() instead since we're only passing
the data through.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | common/cmd_strings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_strings.c b/common/cmd_strings.c index db54f29e26..7d05cf8e93 100644 --- a/common/cmd_strings.c +++ b/common/cmd_strings.c @@ -29,7 +29,8 @@ int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) char *addr = start_addr; do { - printf("%s\n", addr); + puts(addr); + puts("\n"); addr += strlen(addr) + 1; } while (addr[0] && addr < last_addr); |