diff options
author | Yuval Peress <peress@chromium.org> | 2021-06-17 13:20:25 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-18 19:05:01 +0000 |
commit | 257acda4b812d01687710ac2565e60e8df203eb2 (patch) | |
tree | b4d8daca0a7d8a8f85b4d0390ea5793cfcb60c42 /common | |
parent | f1e0e13b2b71bf8f97b6da4e3eab27fd17000292 (diff) | |
download | chrome-ec-257acda4b812d01687710ac2565e60e8df203eb2.tar.gz |
zephyr: update snprintf signature to be compatible with zephyr 2.6
Also update the tests for printf since the documentation makes no
guarantee about negative size values.
BRANCH=none
BUG=b:190731415
TEST=build brya
TEST=make run-printf
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I5e773362f1f30a1beb95284e589e49db3a1d8800
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2970989
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/printf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/printf.c b/common/printf.c index 039a83a92f..14226800b6 100644 --- a/common/printf.c +++ b/common/printf.c @@ -494,7 +494,7 @@ static int snprintf_addchar(void *context, int c) return 0; } -int snprintf(char *str, int size, const char *format, ...) +int snprintf(char *str, size_t size, const char *format, ...) { va_list args; int rv; @@ -506,7 +506,7 @@ int snprintf(char *str, int size, const char *format, ...) return rv; } -int vsnprintf(char *str, int size, const char *format, va_list args) +int vsnprintf(char *str, size_t size, const char *format, va_list args) { struct snprintf_context ctx; int rv; |