tests: logging: Use proper type

Function cbpprintf() returns int type and may return negative error
code. Fixes static tool warnings.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2023-01-03 13:37:40 +02:00 committed by Carles Cufí
commit b5fd057d90

View file

@ -122,8 +122,8 @@ void log_frontend_msg(const void *source,
char str[128]; char str[128];
struct test_str s = { .str = str }; struct test_str s = { .str = str };
size_t len = cbpprintf(out, &s, package);
int len = cbpprintf(out, &s, package);
if (len > 0) { if (len > 0) {
str[len] = '\0'; str[len] = '\0';
} }