summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/printf.c b/common/printf.c
index 1034058a50..37a0f42058 100644
--- a/common/printf.c
+++ b/common/printf.c
@@ -378,5 +378,5 @@ int vsnprintf(char *str, int size, const char *format, va_list args)
/* Terminate string */
*ctx.str = '\0';
- return rv;
+ return (rv == EC_SUCCESS) ? (ctx.str - str) : -rv;
}