From 7a22d334e27ab350b1f7d34065114928a575bfd8 Mon Sep 17 00:00:00 2001 From: "osboxes.org" Date: Tue, 31 Dec 2019 22:31:43 +0100 Subject: [PATCH] style --- armsrc/nprintf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/armsrc/nprintf.c b/armsrc/nprintf.c index b61ad794d..f86406322 100644 --- a/armsrc/nprintf.c +++ b/armsrc/nprintf.c @@ -782,7 +782,7 @@ static int _vsnprintf(out_fct_type out, char *buffer, const size_t maxlen, const case 's' : { const char *p = va_arg(va, char *); - unsigned int l = _strnlen_s(p, precision ? precision : (size_t) -1); + unsigned int l = _strnlen_s(p, precision ? precision : (size_t) - 1); // pre padding if (flags & FLAGS_PRECISION) { l = (l < precision ? l : precision); @@ -849,7 +849,7 @@ int printf_(const char *format, ...) { va_list va; va_start(va, format); char buffer[1]; - const int ret = _vsnprintf(_out_char, buffer, (size_t) -1, format, va); + const int ret = _vsnprintf(_out_char, buffer, (size_t) - 1, format, va); va_end(va); return ret; } @@ -858,7 +858,7 @@ int printf_(const char *format, ...) { int sprintf_(char *buffer, const char *format, ...) { va_list va; va_start(va, format); - const int ret = _vsnprintf(_out_buffer, buffer, (size_t) -1, format, va); + const int ret = _vsnprintf(_out_buffer, buffer, (size_t) - 1, format, va); va_end(va); return ret; } @@ -875,7 +875,7 @@ int snprintf_(char *buffer, size_t count, const char *format, ...) { int vprintf_(const char *format, va_list va) { char buffer[1]; - return _vsnprintf(_out_char, buffer, (size_t) -1, format, va); + return _vsnprintf(_out_char, buffer, (size_t) - 1, format, va); } @@ -888,7 +888,7 @@ int fctprintf(void (*out)(char character, void *arg), void *arg, const char *for va_list va; va_start(va, format); const out_fct_wrap_type out_fct_wrap = { out, arg }; - const int ret = _vsnprintf(_out_fct, (char *)(uintptr_t)&out_fct_wrap, (size_t) -1, format, va); + const int ret = _vsnprintf(_out_fct, (char *)(uintptr_t)&out_fct_wrap, (size_t) - 1, format, va); va_end(va); return ret; }