diff options
author | Carl Hamilton <carlh@chromium.org> | 2017-03-08 08:07:50 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-08 13:23:06 -0800 |
commit | f23ca90aef4c2583821a6964e3a86af81ad76a59 (patch) | |
tree | 005778f9c0df5dc8a6561172dc210febc59ae938 /common/system.c | |
parent | 2b22a4b25f6aec16920a2670e7d74f58a91082d9 (diff) | |
download | chrome-ec-f23ca90aef4c2583821a6964e3a86af81ad76a59.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>
Diffstat (limited to 'common/system.c')
-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 8608a9913c..02be2e81a0 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; } |