diff options
author | Carl Hamilton <carlh@chromium.org> | 2017-03-08 08:07:50 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-03-09 00:50:40 +0000 |
commit | f6193cb84995f4cf1fb7cbb18cec6229e1fb6fec (patch) | |
tree | 9414a040b5327c3ee415ea290c765acb4986c028 | |
parent | f5806529ec1ca8bfc9bb6be7a43f4c55340acda4 (diff) | |
download | chrome-ec-f6193cb84995f4cf1fb7cbb18cec6229e1fb6fec.tar.gz |
common: Ensure print_build_string() prints short strings properly.
Pass "full_build_string" to ccprintf() as expected. I believe that this
code only worked previosly due to blind luck; the compiler allocated
"full_build_string" on the stack in such a way that it was available at the
end of the call frame for ccprintf().
BUG=none
BRANCH=none
TEST=make -j buildall
Change-Id: Ib307547a4c4d6300ccf018b33aee4db7a4f364f8
Reviewed-on: https://chromium-review.googlesource.com/451084
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Carl Hamilton <carlh@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
(cherry picked from commit f23ca90aef4c2583821a6964e3a86af81ad76a59)
Reviewed-on: https://chromium-review.googlesource.com/451999
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Trybot-Ready: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | common/system.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/system.c b/common/system.c index 25acdbf544..2908b11c94 100644 --- a/common/system.c +++ b/common/system.c @@ -925,7 +925,7 @@ static void print_build_string(void) /* 50 characters or less, will fit into the terminal line. */ if (strlen(full_build_string) < 50) { - ccprintf("%s\n"); + ccprintf("%s\n", full_build_string); return; } |