Avoid initializing full stdio_stack_buffer object with zeros (#992)

This commit is contained in:
Graham Sanderson 2022-09-26 11:49:16 -05:00 committed by GitHub
parent 98aba25e64
commit 3ed9e2fb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,7 +243,8 @@ int WRAPPER_FUNC(vprintf)(const char *format, va_list va) {
} }
int ret; int ret;
#if LIB_PICO_PRINTF_PICO #if LIB_PICO_PRINTF_PICO
struct stdio_stack_buffer buffer = {.used = 0}; struct stdio_stack_buffer buffer;
buffer.used = 0;
ret = vfctprintf(stdio_buffered_printer, &buffer, format, va); ret = vfctprintf(stdio_buffered_printer, &buffer, format, va);
stdio_stack_buffer_flush(&buffer); stdio_stack_buffer_flush(&buffer);
stdio_flush(); stdio_flush();