]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
print_buffer: optimize & shrink
authorMike Frysinger <vapier@gentoo.org>
Fri, 23 Jul 2010 10:17:30 +0000 (06:17 -0400)
committerWolfgang Denk <wd@denx.de>
Sun, 8 Aug 2010 22:28:38 +0000 (00:28 +0200)
commit64419e47518bbba059c80b77558f93ad4804145c
treeba402e033d5191592d045c3eaee6d1a3bf7da0ed
parent8faba4894c6e2bafbfab17260f3db17867cd50d2
print_buffer: optimize & shrink

Applying a little creative format string allows us to shrink the initial
data read & display loop by only calling printf once.  Re-using the local
data buffer to generate the string we want to display then allows us to
output everything with just one printf call instead of multiple calls to
the putc function.

The local stack buffer needs increasing by 1 byte, but the resulting code
shrink and speed up is worth it I think.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
lib/display_options.c