diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-06-27 14:53:17 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-28 07:06:45 -0700 |
commit | cacc1c8ac679b66876cf3e65c58f2bf874498050 (patch) | |
tree | 46a4dd00938bb027543309855bcc129e6eeca06b /Makefile | |
parent | 02b12a8b42d92f35e574ca954c1fe553fbfacd2a (diff) | |
download | chrome-ec-cacc1c8ac679b66876cf3e65c58f2bf874498050.tar.gz |
common/printf: snprintf: Return number of bytes on success
As indicated in the man page:
"""
Upon successful return, these functions return the number of
characters printed (excluding the null byte used to end output to
strings).
"""
There are no users of the return value currently in the EC code,
but this matters when doing fuzzing, as libFuzzer calls
std::to_string, which expects the correct return value.
BRANCH=none
BUG=chromium:854975
TEST=make buildfuzztests -j && ASAN_OPTIONS="log_path=stderr" \
build/host/usb_pd_fuzz/usb_pd_fuzz.exe -jobs=10
actually creates 10 output files.
TEST=make run-utils_str -j
Change-Id: If6a040f690dd847f4c88c3b8566554afdfbabc32
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1116625
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions