Skip to content
Snippets Groups Projects
Commit 64419e47 authored by Mike Frysinger's avatar Mike Frysinger Committed by Wolfgang Denk
Browse files

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: default avatarMike Frysinger <vapier@gentoo.org>
parent 8faba489
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment